-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Using debug
package causes bug with turbopack
and @svgr/webpack
#78804
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
Comments
Used the reproduction to create a more minimal reproduction that highlights the Node.js error:
It seems to only happen when trying to assign values to an env var that was already set before. |
Seems the root cause is here where process.env is turned into a proxy for webpack loaders:
|
Verified it's indeed caused by that Proxy, even smaller reproduction in isolation:
|
Fixed the problem in #78962. Thanks for the reproduction! Very helpful 🙏 |
Link to the code that reproduces this issue
https://github.com/paul-vd/nextjs-debug-reproduction
To Reproduce
.env
withDEBUG="acme*"
(acme
can be anything)bun run dev
http://localhost:3000
Current vs. Expected behavior
I expected to see the next.js logo, but I observed the following error instead:
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:47 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 8 Binaries: Node: 22.13.1 npm: 10.9.2 Yarn: 1.22.22 pnpm: 8.8.0 Relevant Packages: next: 15.4.0-canary.19 // Latest available version is detected (15.4.0-canary.19). eslint-config-next: N/A react: 19.1.0 react-dom: 19.1.0 typescript: 5.8.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I have also tested without installing the
debug
, but the same issue occurs, I believe it might be a peer of other depenencies, from lock file:The text was updated successfully, but these errors were encountered: