Problems at 'Hello World' step npm issues, willing to work through!
Running npm install produces: 41 vulnerabilities (1 low, 6 moderate, 29 high, 5 critical) Running npm audit fix produces: 8 vulnerabilities (1 low, 7 high) Now am faced with a situation which will produce breaking changes!! As a developer who is an npm and wasm novice this looks like a potentially big climb when I am not even sure the previous steps are correct. I am willing and able to work through this or step back and start again but I think I need some help. Judging by other issues raised so do others! $ npm ls [email protected] ~/code/wasm-rust/rust-and-webassembly-book/wasm-game-of-life/www ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected] $ npm ls -g ~/.nvm/versions/node/v20.11.1/lib ├── [email protected] ├── [email protected] └── [email protected]
I had the same issue and I found answers here https://github.com/rustwasm/book/issues/295
- Your devDependencies should be as follows
"devDependencies": {
"@webpack-cli/serve": "^2.0.5",
"copy-webpack-plugin": "^11.0.0",
"hello-wasm-pack": "^0.1.0",
"webpack": "^5.88.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
}
- then you need to replace plugins as follows in webpack.config.js
plugins: [new CopyWebpackPlugin({ patterns: ["index.html"] })],
And also this add this experiments: { asyncWebAssembly: true },
More other infos are here : https://github.com/rustwasm/create-wasm-app/issues/206
I had the same problem and @abdounasser202 's input addressed it