Hi all,
I am trying to explore Rust's usage with Wasm, and I'm following the tutorial on the Wasm book.
However, apparently it doesn't work on WSL2? I did this:
cargo generate --git https://github.com/rustwasm/wasm-pack-template
#[insert 'wasm-game-of-life']
cd wasm-game-of-life
wasm-pack build
npm init wasm-app www
but I get
~/wasm-game-of-life$ npm init wasm-app www
npm error could not determine executable to run
npm error A complete log of this run can be found in: /home/abertulli/.npm/_logs/2024-09-25T15_28_08_288Z-debug-0.log
I have seen other had problems with this, but their solution apparently didn't work for me.
My environment:
$ node -v
v20.17.0
$ npm -v
10.8.3
$ nvm -v
0.40.1
$ nvm ls
-> v20.17.0
v22.9.0
system
default -> lts/* (-> v20.17.0)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v22.9.0) (default)
stable -> 22.9 (-> v22.9.0) (default)
lts/* -> lts/iron (-> v20.17.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.20.2 (-> N/A)
lts/hydrogen -> v18.20.4 (-> N/A)
lts/iron -> v20.17.0
Is this supposed to happen? Can I fix it? Thank you!