rustwasm / rust-webpack-template

Kickstart your Rust, WebAssembly, and Webpack project!
Apache License 2.0
562 stars 75 forks source link

npm init --verbose rust-webpack my-app fails with Error: could not determine executable to run #190

Open haai opened 1 month ago

haai commented 1 month ago

Describe the Bug

I am try to install the rust-webpack template as stated in the documentation.

Do you have any idea to tackle this down?

Steps to Reproduce

$ npm init --verbose rust-webpack my-app

Expected Behavior

install successful

Actual Behavior

➜  ~ npm init --verbose rust-webpack my-app

npm verbose cli /Users/haai/.nvm/versions/node/v22.6.0/bin/node /Users/haai/.nvm/versions/node/v22.6.0/bin/npm
npm info using npm@10.8.2
npm info using node@v22.6.0
npm verbose title npm init rust-webpack my-app
npm verbose argv "init" "--loglevel" "verbose" "rust-webpack" "my-app"
npm verbose logfile logs-max:10 dir:/Users/haai/.npm/_logs/2024-08-11T15_25_59_622Z-
npm verbose logfile /Users/haai/.npm/_logs/2024-08-11T15_25_59_622Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/create-rust-webpack 184ms (cache revalidated)
npm verbose stack Error: could not determine executable to run
npm verbose stack     at getBinFromManifest (/Users/haai/.nvm/versions/node/v22.6.0/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
npm verbose stack     at exec (/Users/haai/.nvm/versions/node/v22.6.0/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
npm verbose stack     at async Init.execCreate (/Users/haai/.nvm/versions/node/v22.6.0/lib/node_modules/npm/lib/commands/init.js:136:5)
npm verbose stack     at async Init.exec (/Users/haai/.nvm/versions/node/v22.6.0/lib/node_modules/npm/lib/commands/init.js:44:14)
npm verbose stack     at async Npm.exec (/Users/haai/.nvm/versions/node/v22.6.0/lib/node_modules/npm/lib/npm.js:207:9)
npm verbose stack     at async module.exports (/Users/haai/.nvm/versions/node/v22.6.0/lib/node_modules/npm/lib/cli/entry.js:74:5)
npm verbose pkgid create-rust-webpack@0.3.0
npm error could not determine executable to run
npm verbose cwd /Users/haai
npm verbose os Darwin 23.5.0
npm verbose node v22.6.0
npm verbose npm  v10.8.2
npm verbose exit 1
npm verbose code 1
npm error A complete log of this run can be found in: /Users/haai/.npm/_logs/2024-08-11T15_25_59_622Z-debug-0.log

Additional Context


➜  ~ uname -am
Darwin MacBook-Pro.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64
➜  ~ nvm -v
0.39.7
➜  ~ node -v
v22.6.0
➜  ~ npm -v
10.8.2
remiposo commented 4 weeks ago

I encountered the same issue. It seems to be a problem with npm, so I created an issue for it. https://github.com/npm/package-json/issues/116

As a workaround, you can either downgrade npm to version 10.8.0 or lower, or simply clone the repository and run .bin/create-rust-webpack.js directly.