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

[Bug?]: Error: Unknown file extension ".wasm" when --experimental-wasm-modules #6678

Open
1 task
loynoir opened this issue Feb 4, 2025 · 0 comments
Open
1 task
Labels
bug Something isn't working

Comments

@loynoir
Copy link

loynoir commented Feb 4, 2025

Self-service

  • I'd be willing to implement a fix

Describe the bug

Error: Unknown file extension ".wasm" when --experimental-wasm-modules

https://nodejs.org/api/esm.html#wasm-modules

To reproduce

$ node --experimental-wasm-modules ./x.mjs
(node:676955) ExperimentalWarning: Importing WebAssembly modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
42
$ yarn --version
4.6.0
$ yarn node --experimental-wasm-modules ./x.mjs

node:internal/modules/run_main:104
    triggerUncaughtException(
    ^
Error: Unknown file extension ".wasm" for /path/to/dist/hello.wasm
    at getFileFormat (file:///path/to/.pnp.loader.mjs:1492:13)
    at load$1 (file:///path/to/.pnp.loader.mjs:1523:18)
    at nextLoad (node:internal/modules/esm/hooks:748:28)
    at Hooks.load (node:internal/modules/esm/hooks:385:26)
    at MessagePort.handleMessage (node:internal/modules/esm/worker:199:24)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20)
    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)

Node.js v23.7.0

Environment

node 23.7.0
yarn 4.6.0

Additional context

No response

@loynoir loynoir added the bug Something isn't working label Feb 4, 2025
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

No branches or pull requests

1 participant