Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install error #3049

Open
totxiao opened this issue May 25, 2023 · 6 comments
Open

npm install error #3049

totxiao opened this issue May 25, 2023 · 6 comments

Comments

@totxiao
Copy link

totxiao commented May 25, 2023

when i execute “npm install”, i got this:

npm ERR! code 2
npm ERR! path /Users/zyb/Documents/project/scratch-blocks
npm ERR! command failed
npm ERR! command sh -c python build.py && webpack

The detail log is:

426 timing command:install Completed in 92178ms
427 verbose stack Error: command failed
427 verbose stack at ChildProcess. (/Users/zyb/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
427 verbose stack at ChildProcess.emit (node:events:527:28)
427 verbose stack at maybeClose (node:internal/child_process:1092:16)
427 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
428 verbose pkgid [email protected]
429 verbose cwd /Users/zyb/Documents/project/scratch-blocks
430 verbose Darwin 21.1.0
431 verbose argv "/Users/zyb/.nvm/versions/node/v16.15.0/bin/node" "/Users/zyb/.nvm/versions/node/v16.15.0/bin/npm" "install"
432 verbose node v16.15.0
433 verbose npm v8.5.5
434 error code 2
435 error path /Users/zyb/Documents/project/scratch-blocks
436 error command failed
437 error command sh -c python build.py && webpack
438 verbose exit 2
439 timing npm Completed in 92579ms
440 verbose code 2

How should I fix it?

@PaxtonPenguin
Copy link

i'm having the same issue

@PaxtonPenguin
Copy link

answer, install python

@PaxtonPenguin
Copy link

@PaxtonPenguin
Copy link

use wsl, thats the answer

@CST1229
Copy link

CST1229 commented Sep 23, 2023

use wsl, thats the answer

Or you can apply the changes from this PR to your build.py (which works for me), though you should eventually revert them if you're planning on contributing.

@PaxtonPenguin
Copy link

that fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants