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

Build fails w/ swc transform "RuntimeError: unreachable" #61432

Closed
aplr opened this issue Jan 31, 2024 · 2 comments
Closed

Build fails w/ swc transform "RuntimeError: unreachable" #61432

aplr opened this issue Jan 31, 2024 · 2 comments
Labels
bug Issue was opened via the bug report template. locked SWC Related to minification/transpilation in Next.js.

Comments

@aplr
Copy link

aplr commented Jan 31, 2024

Link to the code that reproduces this issue

https://github.com/aplr/next_swc_plugin_issue

Tested w/ 14.1.1-canary.25, 14.1.1-canary.26, 14.1.1-canary.27

To Reproduce

  1. Build the application
  2. Watch the build fail

Current vs. Expected behavior

Current: build fails
Expectation: build does not fail

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
Binaries:
  Node: 21.5.0
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 8.14.1
Relevant Packages:
  next: 14.1.1-canary.25 // Latest available version is detected (14.1.1-canary.25).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A

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

SWC transpilation

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

next build (local)

Additional context

14.1.1-canary.15 last working version. Not working since 14.1.1-canary.16.

Error log

thread 'thread 'thread 'thread '' panicked at '' panicked at '' panicked at 'called Result::unwrap() on an Err value: LayoutErrorcalled Result::unwrap() on an Err value: LayoutErrorcalled Result::unwrap() on an Err value: LayoutError', ', ' panicked at '', called Result::unwrap() on an Err value: LayoutError/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs:::', 266266/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs:266:::6767266
:6767note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/server/future/route-modules/app-page/module.compiled.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
stack backtrace:
thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/pages/_document.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/pages/_app.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
thread '' panicked at stack backtrace:
/Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/pages/_error.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
stack backtrace:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
stack backtrace:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread '' panicked at 'called Result::unwrap() on an Err value: LayoutError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs:thread 'thread '266:' panicked at 'called Result::unwrap() on an Err value: LayoutError67', ' panicked at '
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rscalled Result::unwrap() on an Err value: LayoutErrornote: run with RUST_BACKTRACE=1 environment variable to display a backtrace
:thread '', 266/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs::' panicked at '266called Result::unwrap() on an Err value: LayoutError:67thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
', failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/client/components/not-found-error.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
67
stack backtrace:
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
:266note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
:67
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/client/components/error-boundary.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/server/future/route-kind.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
thread 'stack backtrace:
' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/server/app-render/entry-base.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
stack backtrace:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
stack backtrace:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread 'thread 'thread '' panicked at '' panicked at '' panicked at 'called Result::unwrap() on an Err value: LayoutErrorcalled Result::unwrap() on an Err value: LayoutErrorcalled Result::unwrap() on an Err value: LayoutError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs::266266:67:',
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
67
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs:thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs266thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162::14162:
:failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/client.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
:stack backtrace:
14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/tools.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
67note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

stack backtrace:
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/server/future/route-modules/app-page/vendored/rsc/react-jsx-runtime.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
stack backtrace:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread '' panicked at 'called Result::unwrap() on an Err value: LayoutError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.42/src/impls/core/mod.rs:266:67
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread '' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/app/now.tsx")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:
stack backtrace:
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
Failed to compile.

./node_modules/next/dist/pages/_app.js
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/pages/_app.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2:
3:

./node_modules/next/dist/pages/_document.js
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/pages/_document.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2:
3:

./node_modules/next/dist/pages/_error.js
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/pages/_error.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2:
3:

Import trace for requested module:
./node_modules/next/dist/pages/_error.js

./app/now.tsx
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/app/now.tsx")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2:
3:

Import trace for requested module:
./app/now.tsx
./app/page.tsx

./node_modules/next/dist/client/components/error-boundary.js
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next/dist/client/components/error-boundary.js")'

Caused by:
0: failed to invoke /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/andreas/Developer/playground/next_swc_plugin_issue/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2: _BrotliDecoderVersion
3: _BrotliDecoderVersion
4: _BrotliDecoderVersion
5: _BrotliDecoderVersion
6: _BrotliDecoderVersion
7:
8: _BrotliDecoderVersion
9: _BrotliDecoderVersion
10: _BrotliDecoderVersion
11: _BrotliDecoderVersion
12:
13:
14:
15:
16:
17:
18:

Stack backtrace:
0: _napi_register_module_v1
1: _napi_register_module_v1
2:
3:

@aplr aplr added the bug Issue was opened via the bug report template. label Jan 31, 2024
@github-actions github-actions bot added the SWC Related to minification/transpilation in Next.js. label Jan 31, 2024
@aplr aplr changed the title Build fails w/ swc transform " Build fails w/ swc transform "RuntimeError: unreachable" Jan 31, 2024
@kdy1
Copy link
Member

kdy1 commented Feb 2, 2024

This is a bug of next-superjson-plugin.

Currently Wasm plugins are not backward compatible.

See https://swc.rs/docs/plugin/selecting-swc-core

@kdy1 kdy1 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked SWC Related to minification/transpilation in Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants