Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Web Worker Reference error #68

Open
DeepAlien890 opened this issue Jan 19, 2025 · 0 comments
Open

[Bug] Web Worker Reference error #68

DeepAlien890 opened this issue Jan 19, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@DeepAlien890
Copy link

Bug Description

I tried to run latest code locally on my end but got the reference error when loading pages.

ReferenceError: Worker is not defined
    at new WebLLMApi (webpack-internal:///(ssr)/./app/client/webllm.ts:35:97)
    at Timeout.eval [as _onTimeout] (webpack-internal:///(ssr)/./app/components/home.tsx:269:23)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
 ⨯ app\client\webllm.ts (64:14) @ Worker
 ⨯ uncaughtException: ReferenceError: Worker is not defined
    at new WebLLMApi (webpack-internal:///(ssr)/./app/client/webllm.ts:35:97)
    at Timeout.eval [as _onTimeout] (webpack-internal:///(ssr)/./app/components/home.tsx:269:23)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
  62 |         type: "webWorker",
  63 |         engine: new WebWorkerMLCEngine(
> 64 |           new Worker(new URL("../worker/web-worker.ts", import.meta.url), {
     |              ^
  65 |             type: "module",
  66 |           }),
  67 |           engineConfig,
 ⨯ app\client\webllm.ts (64:14) @ Worker
 ⨯ uncaughtException: 

Steps to Reproduce

Just run npm run dev and load the first page.
On console, you can see the message above.

Expected Behavior

I'm wondering if this is the root cause of failure in access from others in lan.

Screenshots

No response

LLM Model ID

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@DeepAlien890 DeepAlien890 added the bug Something isn't working label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant