Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Open
paul-vd opened this issue May 3, 2025 · 0 comments
Open

Using debug package causes bug with turbopack and @svgr/webpack #78804

paul-vd opened this issue May 3, 2025 · 0 comments
Labels
Turbopack Related to Turbopack with Next.js.

Comments

@paul-vd
Copy link
Contributor

paul-vd commented May 3, 2025

Link to the code that reproduces this issue

https://github.com/paul-vd/nextjs-debug-reproduction

To Reproduce

  1. Ensure you have a .env with DEBUG="acme*" (acme can be anything)
  2. Start the application bun run dev
  3. Open http://localhost:3000

Current vs. Expected behavior

I expected to see the next.js logo, but I observed the following error instead:

 ⨯ ./app/next.svg
Error evaluating Node.js code
TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
    [at Function.save (/private/tmp/reproduction-app/node_modules/debug/src/node.js:205:21)]
    [at Function.enable (/private/tmp/reproduction-app/node_modules/debug/src/common.js:163:15)]
    [at setup (/private/tmp/reproduction-app/node_modules/debug/src/common.js:287:14)]
    [at Object.<anonymous> (/private/tmp/reproduction-app/node_modules/debug/src/node.js:240:37)]
    [at Module._compile (node:internal/modules/cjs/loader:1562:14)]
    [at Object..js (node:internal/modules/cjs/loader:1699:10)]
    [at Module.load (node:internal/modules/cjs/loader:1313:32)]
    [at Function._load (node:internal/modules/cjs/loader:1123:12)]
    [at TracingChannel.traceSync (node:diagnostics_channel:322:14)]
    [at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)]



./app/page.tsx:1:1
Export default doesn't exist in target module
> 1 | import NextLogo from "./next.svg";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2 | export default function Home() {
  3 |   return (
  4 |     <div>

The export default was not found in module [project]/app/next.svg.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

 ○ Compiling /_error ...
 ✓ Compiled /_error in 931ms
 GET / 500 in 4004ms
 ✓ Compiled /favicon.ico in 470ms
 GET /favicon.ico 500 in 524ms

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:

  • @babel/traverse
  • @babel/helper-define-polyfill-provider
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant