Open magnus-ISU opened 8 months ago
Thanks for this, was really helpful.
I was still having issues with this but I changed the devDependencies
in package.json
to this:
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",
"hello-wasm-pack": "^0.1.0",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
}
and that fixed it.
@magnus-ISU, did you PR the wasm-pack-template
?
I got an error at this line:
npm init wasm-app www
The error:
npm error could not determine executable to run
npm error A complete log of this run can be found in: /home/davinci/.npm/_logs/2024-06-02T21_19_23_965Z-debug-0.log
The contents of the log file:
0 verbose cli /home/davinci/.nvm/versions/node/v20.12.2/bin/node /home/davinci/.nvm/versions/node/v20.12.2/bin/npm
1 info using npm@10.8.1
2 info using node@v20.12.2
3 silly config load:file:/home/davinci/.nvm/versions/node/v20.12.2/lib/node_modules/npm/npmrc
4 silly config load:file:/home/davinci/workspace/prep-rust/rustwasm/wasm-game-of-life/.npmrc
5 silly config load:file:/home/davinci/.npmrc
6 silly config load:file:/home/davinci/.nvm/versions/node/v20.12.2/etc/npmrc
7 verbose title npm init wasm-app www
8 verbose argv "init" "wasm-app" "www"
9 verbose logfile logs-max:10 dir:/home/davinci/.npm/_logs/2024-06-02T21_19_23_965Z-
10 verbose logfile /home/davinci/.npm/_logs/2024-06-02T21_19_23_965Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
14 http fetch GET 200 https://registry.npmjs.org/create-wasm-app 227ms (cache revalidated)
15 verbose stack Error: could not determine executable to run
15 verbose stack at getBinFromManifest (/home/davinci/.nvm/versions/node/v20.12.2/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
15 verbose stack at exec (/home/davinci/.nvm/versions/node/v20.12.2/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:198:15)
15 verbose stack at async Init.execCreate (/home/davinci/.nvm/versions/node/v20.12.2/lib/node_modules/npm/lib/commands/init.js:136:5)
15 verbose stack at async Init.exec (/home/davinci/.nvm/versions/node/v20.12.2/lib/node_modules/npm/lib/commands/init.js:44:14)
15 verbose stack at async Npm.exec (/home/davinci/.nvm/versions/node/v20.12.2/lib/node_modules/npm/lib/npm.js:207:9)
15 verbose stack at async module.exports (/home/davinci/.nvm/versions/node/v20.12.2/lib/node_modules/npm/lib/cli/entry.js:74:5)
16 verbose pkgid create-wasm-app@0.1.0
17 error could not determine executable to run
18 verbose cwd /home/davinci/workspace/prep-rust/rustwasm/wasm-game-of-life
19 verbose os Linux 6.5.0-35-generic
20 verbose node v20.12.2
21 verbose npm v10.8.1
22 verbose exit 1
23 verbose code 1
24 error A complete log of this run can be found in: /home/davinci/.npm/_logs/2024-06-02T21_19_23_965Z-debug-0.log
The work-around (from #169) is apparently to run this instead:
cargo generate --git https://github.com/rustwasm/create-wasm-app # type "www" at the prompt
Run the following code instead:
and then
This should work in
bash
. Inzsh
you can just run it all at once for some reason