0

OS: M1 Monterey

Node version: v16.14.2

Terminal: iTerm

Do any of you know why i can't run npm install on my work project

this is the error output

npm ERR! code 1
npm ERR! path /Users/bendoro/Documents/work/intern/sirclo-frontend/sirclo-repo/prius-fe/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /Users/bendoro/.nvm/versions/node/v16.14.2/bin/node /Users/bendoro/Documents/work/intern/sirclo-frontend/sirclo-repo/prius-fe/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/Users/bendoro/.nvm/versions/node/v16.14.2/bin/node',
npm ERR! gyp verb cli   '/Users/bendoro/Documents/work/intern/sirclo-frontend/sirclo-repo/prius-fe/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.14.2 | darwin | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "/Users/bendoro/.pyenv/shims/python3" in the PATH
npm ERR! gyp verb `which` succeeded /Users/bendoro/.pyenv/shims/python3 /Users/bendoro/.pyenv/shims/python3
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /Users/bendoro/.pyenv/shims/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:399:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:451:11)
npm ERR! gyp ERR! stack     at Socket.emit (node:events:526:28)
npm ERR! gyp ERR! stack     at Pipe.<anonymous> (node:net:687:12)
npm ERR! gyp ERR! System Darwin 21.6.0
npm ERR! gyp ERR! command "/Users/bendoro/.nvm/versions/node/v16.14.2/bin/node" "/Users/bendoro/Documents/work/intern/sirclo-frontend/sirclo-repo/prius-fe/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/bendoro/Documents/work/intern/sirclo-frontend/sirclo-repo/prius-fe/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

i try running npm install when this error output come out.

anyone here know how to fix this? thank you

  • Does this answer your question? [npm install with error: \`gyp\` failed with exit code: 1](https://stackoverflow.com/questions/49348482/npm-install-with-error-gyp-failed-with-exit-code-1) – Alex Yepes Nov 21 '22 at 14:13
  • no unfortunately it didn't worked for me @AlexYepes – Muhammad Iqbal Nov 22 '22 at 03:51

0 Answers0