You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wasm-pack build --target bundler
cd site
npm run build
See error
Expected Behavior
Succesfull build and a webpage on localhost displaying an alert message
Actual Behavior
The following build error
❯ npm run build
> hello-wasm@1.0.0 build
> webpack --config webpack.config.js
assets by status 1.37 KiB [cached] 1 asset
asset index.js 12.2 KiB [emitted] (name: main)
asset index.html 170 bytes [compared for emit] [from: index.html] [copied]
runtime modules 1.77 KiB 4 modules
cacheable modules 3.13 KiB (javascript) 16.3 KiB (webassembly)
modules by path ../pkg/*.js 3.02 KiB
../pkg/hello_wasm.js 182 bytes [built] [code generated]
../pkg/hello_wasm_bg.js 2.84 KiB [built] [code generated]
./index.js 73 bytes [built] [code generated]
../pkg/hello_wasm_bg.wasm 40 bytes (javascript) 16.3 KiB (webassembly) [built] [code generated] [1 error]
ERROR in ../pkg/hello_wasm_bg.wasm
Module parse failed: Unknown element type in table: 0xNaN
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
Error: Unknown element type in table: 0xNaN
at parseTableType (/Users/hayer/rust/hello-wasm/site/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:1018:13)
at parseTableSection (/Users/hayer/rust/hello-wasm/site/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:1274:24)
at parseSection (/Users/hayer/rust/hello-wasm/site/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:1406:24)
at Object.decode (/Users/hayer/rust/hello-wasm/site/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:1740:25)
at decode (/Users/hayer/rust/hello-wasm/site/node_modules/@webassemblyjs/wasm-parser/lib/index.js:253:21)
at WebAssemblyParser.parse (/Users/hayer/rust/hello-wasm/site/node_modules/webpack/lib/wasm-async/AsyncWebAssemblyParser.js:61:19)
at /Users/hayer/rust/hello-wasm/site/node_modules/webpack/lib/NormalModule.js:1309:19
at processResult (/Users/hayer/rust/hello-wasm/site/node_modules/webpack/lib/NormalModule.js:938:11)
at /Users/hayer/rust/hello-wasm/site/node_modules/webpack/lib/NormalModule.js:1036:5
at /Users/hayer/rust/hello-wasm/site/node_modules/loader-runner/lib/LoaderRunner.js:407:3
@ ../pkg/hello_wasm.js 1:0-45 4:15-19 5:0-21
@ ./index.js 1:0-35 3:0-10
webpack 5.96.1 compiled with 1 error in 112 ms
Additional Context
This works on wasm-bindgen 0.2.93
I have no experience with wasm just following the tutorial. I tried to verify that I have taken all the correct steps.
The text was updated successfully, but these errors were encountered:
Describe the Bug
Upgrade from 0.2.93 to 0.2.95 breaks some webpack builds
Steps to Reproduce
See https://github.com/Jeroendevr/hello-wasm/tree/bug-0.2.95 for full repo
lib.rs
cargo.toml
package.json
wasm-pack build --target bundler cd site npm run build
Expected Behavior
Succesfull build and a webpage on localhost displaying an alert message
Actual Behavior
The following build error
Additional Context
This works on
wasm-bindgen 0.2.93
I have no experience with wasm just following the tutorial. I tried to verify that I have taken all the correct steps.
The text was updated successfully, but these errors were encountered: