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

Nextjs 15 support #110

Open
1 task done
aplr opened this issue Oct 11, 2024 · 4 comments · May be fixed by #111
Open
1 task done

Nextjs 15 support #110

aplr opened this issue Oct 11, 2024 · 4 comments · May be fixed by #111
Labels
bug Something isn't working

Comments

@aplr
Copy link

aplr commented Oct 11, 2024

Verify Next.js canary release

  • I verified that the issue exists in the latest Next.js canary release

Describe the bug

When running the build, I get the following issue. I guess swc_core has to be updated. Is this planned?

---------------------------
Panic: panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.286.0/src/plugin.rs:169:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/<nextjs>/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]_hsfjdoxlqarv5sl66waue4332e/node_modules/next/dist/pages/_document.js")'

Caused by:
    0: failed to invoke `/<nextjs>/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]._6xagpm5pii5xovfhav3ur3hit4/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /<nextjs>/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]._6xagpm5pii5xovfhav3ur3hit4/node_modules/next-superjson-plugin/dist/next_superjson.wasm
    1: failed to run Wasm plugin transform. Please ensure the version of `swc_core` used by the plugin is compatible with the host runtime. See the documentation for compatibility information. If you are an author of the plugin, please update `swc_core` to the compatible version.
                        
                       Note that if you want to use the os features like filesystem, you need to use `wasi`. Wasm itself does not have concept of filesystem.
                        
                       https://swc.rs/docs/plugin/selecting-swc-core
       
                       See https://plugins.swc.rs/versions/from-plugin-runner/0.112.2 for the list of the compatible versions.
                        
                       Build info: 
                           Date: 2024-10-10
                           Timestamp: 2024-10-10T19:06:55.957638000Z
                           
                       Version info: 
                           swc_plugin_runner: 0.112.2
                           Dependencies: anyhow 1.0.86,codspeed-criterion-compat 2.6.0,criterion 0.5.1,enumset 1.1.5,futures 0.3.30,once_cell 1.19.0,parking_lot 0.12.3,serde 1.0.209,serde_json 1.0.127,swc_atoms 0.6.7,swc_common 0.37.5,swc_css_ast 0.144.0,swc_css_parser 0.154.0,swc_ecma_ast 0.118.2,swc_ecma_loader 0.49.1,swc_ecma_parser 0.149.1,swc_ecma_visit 0.104.8,swc_malloc 0.5.11,swc_plugin_proxy 0.47.0,testing 0.39.0,tokio 1.40.0,tracing 0.1.40,vergen 9.0.0,virtual-fs 0.11.4,wasmer 4.3.5,wasmer-cache 4.3.5,wasmer-compiler-cranelift 4.3.5,wasmer-wasix 0.25.0
                       
    2: RuntimeError: out of bounds memory access
Backtrace:    0: _napi_register_module_v1
   1: <unknown>
   2: _napi_register_module_v1
   3: _napi_register_module_v1
   4: _napi_register_module_v1
   5: _napi_register_module_v1
   6: _napi_register_module_v1
   7: _napi_register_module_v1
   8: _BrotliDecoderVersion
   9: _BrotliDecoderVersion
  10: <unknown>
  11: _BrotliDecoderVersion
  12: _BrotliDecoderVersion
  13: _BrotliDecoderVersion
  14: _BrotliDecoderVersion
  15: _BrotliDecoderVersion
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>

Expected behavior

No build error

Reproduction link

No response

Version

0.6.3

Config

No response

Additional context

No response

@aplr aplr added the bug Something isn't working label Oct 11, 2024
@LZL0
Copy link

LZL0 commented Oct 22, 2024

Bumping now that NextJS 15 is out.

@thereis
Copy link

thereis commented Oct 22, 2024

Facing this issue with Next 15.

@serg-and
Copy link

Next changed metadata causing this plugin to no longer work for page router
bump this issue vercel/next.js#72019

@remorses
Copy link

remorses commented Nov 1, 2024

You can use this plugin instead as a temporary workaround https://github.com/remorses/next-superjson

This package always uses the same version of @swc/core so the SWC plugins continues to work, even if Next.js upgrades it, the plugin ships his own frozen version of SWC

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

Successfully merging a pull request may close this issue.

5 participants