-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Typescript error TP1001 when creating a Web Worker in Next.js 15.1.3 #74621
Comments
also experiencing this issue after attempting to turn on Turbopack, would appreciate some guidance here. |
@sam-skydio I'm just ignoring it for now as it seems to be working on the client side and not causing any issues when building for prod as the prod build doesn't use Turbopack. |
use
|
Thank you. That actually worked and suppressed it. |
You could also use one of these new Worker(/* webpackIgnore: true */ "/workers/timer.js");
new Worker(/* turbopackIgnore: true */ "/workers/timer.js"); |
Thanks. Is this documented anywhere? |
Link to the code that reproduces this issue
https://github.com/farzadso/workers-issue
To Reproduce
Run
npm run dev
and you can see the issue.Current vs. Expected behavior
There should be no errors in the console.
This is the error I see:
If I remove
--turbopack
from the dev script it works fine.I noticed this happening after my upgrade to Next.js 15 and using Turbopack for dev builds.
The Web Worker is being created dynamically, and it works fine, so I don't see any issues with the functionality.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.2.0: Fri Dec 6 19:02:12 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6031 Available memory (MB): 36864 Available CPU cores: 14 Binaries: Node: 20.15.1 npm: 10.7.0 Yarn: 1.22.22 pnpm: N/A Relevant Packages: next: 15.2.0-canary.0 // Latest available version is detected (15.2.0-canary.0). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: 5.7.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: