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

@swc/plugin-formatjs: Plugin invokation fails with pointer out of bounds #387

Closed
tom-streller-tutti opened this issue Jan 8, 2025 · 3 comments

Comments

@tom-streller-tutti
Copy link

Describe the bug
Using the official plugin @swc/plugin-formatjs fails with an internal WASM error:

FATAL: An unexpected Turbopack error occurred. Please report the content of /var/folders/8x/wrjv5tmx047cc7vdnhjp0br40000gp/T/next-panic-7076f4752db8755edbe4441acd744935.log, along with a description of what you were doing when the error occurred, to https://github.com/vercel/next.js/issues/new
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/tomstr/Projects/JavaScript/next-swc-formatjs/node_modules/next/dist/pages/_app.js")'

Caused by:
    0: failed to invoke `/Users/tomstr/Projects/JavaScript/next-swc-formatjs/node_modules/@swc/plugin-formatjs/swc_plugin_formatjs.wasm` as js transform plugin at /Users/tomstr/Projects/JavaScript/next-swc-formatjs/node_modules/@swc/plugin-formatjs/swc_plugin_formatjs.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 0x4ba14081398 offset -53202 not in range 0x4ba14081200..0x4ba140813b4"

URL to minimal reproduction

You can reproduce it using my example repo. Just check it out and run

yarn install
yarn build

Expected behavior
Expecting the plugin to run without an error in invokation.

Additional context

Using @swc/core version 1.10.6. I tried other versions. For the main project I'm working on I need to set @swc/core as a direct dependency.

@kdy1
Copy link
Member

kdy1 commented Jan 8, 2025

See https://plugins.swc.rs/versions/range/116.
Formatjs is not in the list and it means it's not supported.

@kdy1 kdy1 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2025
@kdy1
Copy link
Member

kdy1 commented Jan 8, 2025

You can wait for vercel/next.js#74580 to be merged

@tom-streller-tutti
Copy link
Author

You can wait for vercel/next.js#74580 to be merged

Thank you.

Apologies for my prior message, it was rude. I did not understand the compatibility matrix the site shows - it is very useful once I understood it.

It appears we have to wait for Next.js to move, then.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants