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

loading the next.config.ts in section experimental.swcPlugins panics #74611

Closed
hopefullToo opened this issue Jan 7, 2025 · 3 comments
Closed
Labels
bug Issue was opened via the bug report template. SWC Related to minification/transpilation in Next.js. Turbopack Related to Turbopack with Next.js.

Comments

@hopefullToo
Copy link

Link to the code that reproduces this issue

https://github.com/hopefullToo/app_with_swc_plugin.git

To Reproduce

  1. Install plugins @swc/plugin-noop and/or swc-plugin-pre-paths via yarn or npm
  2. Configure next.config.ts (already done in this project)
  3. Start nextjs server (next dev)
  4. The page will not load but display an error message; internal server error. Messages about the fatal error were displayed in the console.

Current vs. Expected behavior

I expect the regular home page to be displayed, but actually "internal server error" is displayed on the page.

Console output:

▲ Next.js 15.1.1-canary.26

✓ Starting...
✓ Ready in 1371ms
FATAL: An unexpected Turbopack error occurred. Please report the content of /var/folders/mw/1wzvb01n2pl6gk42hhm63_bh0000gp/T/next-panic-408bb0c78773adf878cfd0e9dc7ac08f.log, along with a description of what you were doing when the error occurred, to https://github.com/vercel/next.js/issues/new
○ Compiling / ...
⨯ ./app/page.tsx
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/xxxx/Projekte/js/next/app_with_swc_plugin/app/page.tsx")'

Caused by:
0: failed to invoke /Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/@swc/plugin-noop/swc_plugin_noop.wasm as js transform plugin at /Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/@swc/plugin-noop/swc_plugin_noop.wasm
1: wasm plugin bytecheck failed "check bytes error: check failed for tuple struct member 0: check failed for struct member pkg_version: pointer out of bounds: base 0x43762080b84 offset -53202 not in range 0x43762080a00..0x43762080ba0"

Import trace for requested module:
./app/page.tsx
⨯ ./node_modules/next/dist/client/components/not-found-error.js
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/next/dist/client/components/not-found-error.js")'

Caused by:
0: failed to invoke /Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/@swc/plugin-noop/swc_plugin_noop.wasm as js transform plugin at /Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/@swc/plugin-noop/swc_plugin_noop.wasm
1: wasm plugin bytecheck failed "check bytes error: check failed for tuple struct member 0: check failed for struct member pkg_version: pointer out of bounds: base 0x43760140784 offset -53202 not in range 0x43760140600..0x437601407a0"
⨯ ./node_modules/next/dist/client/next-dev.js
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/next/dist/client/next-dev.js")'

Caused by:
0: failed to invoke /Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/@swc/plugin-noop/swc_plugin_noop.wasm as js transform plugin at /Users/xxxx/Projekte/js/next/app_with_swc_plugin/node_modules/@swc/plugin-noop/swc_plugin_noop.wasm
1: wasm plugin bytecheck failed "check bytes error: check failed for tuple struct member 0: check failed for struct member pkg_version: pointer out of bounds: base 0x43760140b84 offset -53202 not in range 0x43760140a00..0x43760140ba0"
⨯ [Error: ENOENT: no such file or directory, open '/Users/xxxx/Projekte/js/next/app_with_swc_plugin/.next/fallback-build-manifest.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/xxxx/Projekte/js/next/app_with_swc_plugin/.next/fallback-build-manifest.json'
}
[Error: ENOENT: no such file or directory, open '/Users/xxxx/Projekte/js/next/app_with_swc_plugin/.next/fallback-build-manifest.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/bexxxxrnd/Projekte/js/next/app_with_swc_plugin/.next/fallback-build-manifest.json'
}
[Error: ENOENT: no such file or directory, open '/Users/xxxx/Projekte/js/next/app_with_swc_plugin/.next/fallback-build-manifest.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/xxxxI expect the regular home page to be displayed, but actually "internal server error" is displayed on the page.

Console output:/Projekte/js/next/app_with_swc_plugin/.next/fallback-build-manifest.json'
}

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.22
  pnpm: N/A

Which area(s) are affected? (Select all that apply)

Turbopack, SWC

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local)

Additional context

I develop on my local apple mac studio.
I use IntelliJ IDEA and Visual Studio Code.

@hopefullToo hopefullToo added the bug Issue was opened via the bug report template. label Jan 7, 2025
@github-actions github-actions bot added SWC Related to minification/transpilation in Next.js. Turbopack Related to Turbopack with Next.js. labels Jan 7, 2025
@hopefullToo
Copy link
Author

I attached the next-panic log:
next-panic-41c04fd422592471bfb652109ad49fc2.log

@hopefullToo
Copy link
Author

The linked reference project runs now. I must check my local environment, which is build with Nx.

@hopefullToo
Copy link
Author

I'm surprised that the reference project I provided crashed at first.
nextjs canary must be loaded, then this problem doesn't occur.
My local project also runs perfectly with canary. I was previously using ^15.1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. SWC Related to minification/transpilation in Next.js. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant