Can someone please help me understand what is going on here, this loaded fine an hour ago, but now it won't, I've removed the node modules and run npm cache clear --force, but still nothing. This is the error I'm getting. I'm certain it is something really really simple, I am completely new to javascript, so it's likely to be more obvious than you think.
Building: /usr/bin/node /home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/usr/bin/node',
gyp verb cli '/home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp#3.8.0
gyp info using node#14.15.5 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "/home/rob/anaconda3/bin/python3" in the PATH
gyp verb `which` succeeded /home/rob/anaconda3/bin/python3 /home/rob/anaconda3/bin/python3
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /home/rob/anaconda3/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Linux 5.4.0-65-generic
gyp ERR! command "/usr/bin/node" "/home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/rob/Development/vue-getting-started/03-data-and-events/begin/vue-heroes/node_modules/node-sass
gyp ERR! node -v v14.15.5
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/rob/.npm/_logs/2021-02-15T22_46_40_202Z-debug.log
Is there anyone that is familiar with this please, people are suggesting that I install python2.7 and other libraries that are in the error message. I can't read javascript, I'm learning it, but I know this is neither an issue with python2.7 or "node-gyp" as neither of these were installed when I had node running fine. This really is a newbie issue, there must be a simple fix for this.
Related
I was trying to build a new project on React and I want to use SASS, but when I start installing npm install node-sass it gives me this node-gyp error
jake#Ehys-Air portfolio % npm install node-sass
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /Users/jake/Development/portfolio/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /Users/jake/Development/portfolio/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 '/usr/local/bin/node',
npm ERR! gyp verb cli '/Users/jake/Development/portfolio/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#8.4.1
npm ERR! gyp info using node#18.4.0 | darwin | arm64
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 find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - executable path is "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
npm ERR! gyp verb find Python - executing "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3" to get version
npm ERR! gyp verb find Python - version is "3.9.10"
npm ERR! gyp info find Python using Python version 3.9.10 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 18.4.0
npm ERR! gyp verb command install [ '18.4.0' ]
npm ERR! gyp verb install input version string "18.4.0"
npm ERR! gyp verb install installing version: 18.4.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 18.4.0
npm ERR! gyp verb build dir attempting to create "build" dir: /Users/jake/Development/portfolio/node_modules/node-sass/build
npm ERR! gyp verb build dir "build" dir needed to be created? Yes
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /Users/jake/Development/portfolio/node_modules/node-sass/build/config.gypi
npm ERR! gyp verb config.gypi checking for gypi file: /Users/jake/Development/portfolio/node_modules/node-sass/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /Users/jake/Development/portfolio/node_modules/node-sass/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/jake/Development/portfolio/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jake/Development/portfolio/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jake/Development/portfolio/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jake/Library/Caches/node-gyp/18.4.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/jake/Library/Caches/node-gyp/18.4.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/jake/Development/portfolio/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/jake/Library/Caches/node-gyp/18.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/jake/Development/portfolio/node_modules/node-sass',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp verb command build []
npm ERR! gyp verb build type Release
npm ERR! gyp verb architecture arm64
npm ERR! gyp verb node dev dir /Users/jake/Library/Caches/node-gyp/18.4.0
npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
npm ERR! Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
npm ERR! See `man xcode-select` for more details.
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/jake/Development/portfolio/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:537:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/jake/Development/portfolio/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/jake/Development/portfolio/node_modules/node-sass
npm ERR! gyp ERR! node -v v18.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jake/.npm/_logs/2022-07-23T07_23_01_464Z-debug-0.log
I am not sure why this is happening because before I used to use SASS/SCSS on my previous react builds. This is kind of frustrating to be honest for a newbie dev like me.
Fixed this problem by installing xcode-select --install because I don't have this command line tools npm ERR! xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
I am new to node and I am trying to run a vue.js project. My node, my npm and my node-gyp version is newer than the ones the project was created with.
I was running
npm install -g node-gyp
npm install -g npm
because node-gyp was looking for python 2.x for sass module. But I am using python 3.x (https://github.com/nodejs/node-gyp/issues/1977)
Now when I run npm install --legacy-peer-deps I get the following error. Can you tell me what is the problem?
PS C:\projectPath> npm install --legacy-peer-deps
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path C:\projectPath\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\projectPath\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 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\projectPath\\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.0 | win32 | 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 "c:\python310\python.exe" in the PATH
npm ERR! gyp verb `which` succeeded c:\python310\python.exe c:\python310\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: c:\python310\python.exe -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:520:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\projectPath\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\projectPath\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\UserName\AppData\Local\npm-cache\_logs\2022-05-10T13_20_35_750Z-debug-0.log
I am to work on this SPFx web part # https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-enhanced-list-formatting . so i downloaded the files, then i tried to run npm install.. but i got this error:-
Your environment has been set up for using Node.js 14.17.0 (x64) and npm.
C:\Windows\System32>cd C:\react-enhanced-list-formatting
C:\react-enhanced-list-formatting>npm install
> node-sass#4.12.0 install C:\react-enhanced-list-formatting\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/win32-x64-83_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/win32-x64-83_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> node-sass#4.12.0 postinstall C:\react-enhanced-list-formatting\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe C:\react-enhanced-list-formatting\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\react-enhanced-list-formatting\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp#3.8.0
gyp info using node#14.17.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\react-enhanced-list-formatting\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\react-enhanced-list-formatting\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\react-enhanced-list-formatting\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\react-enhanced-list-formatting\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\react-enhanced-list-formatting\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\react-enhanced-list-formatting\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\react-enhanced-list-formatting\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\react-enhanced-list-formatting\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\react-enhanced-list-formatting\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\react-enhanced-list-formatting\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\react-enhanced-list-formatting\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\react-enhanced-list-formatting\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Python39\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:319:12)
gyp ERR! stack at ChildProcess.emit (events.js:376:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1055:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\react-enhanced-list-formatting\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\react-enhanced-list-formatting\node_modules\node-sass
gyp ERR! node -v v14.17.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN #voitanos/jest-preset-spfx-react16#1.3.2 requires a peer of jest#^24.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords#3.4.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN gulp-stylelint#11.0.0 requires a peer of stylelint#^10.1.0 || ^11.0.0 || ^12.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-jest#24.0.2 requires a peer of jest#>=24 <25 but none is installed. You must install peer dependencies yourself.
npm WARN uglifyjs-webpack-plugin#0.4.6 requires a peer of webpack#^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-enhanced-list-formatting#0.0.1 No repository field.
npm WARN react-enhanced-list-formatting#0.0.1 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mohan\AppData\Roaming\npm-cache\_logs\2021-11-12T18_25_56_343Z-debug.log
any advice ?
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I cloned a React app from github, and when I run npm install i get the followoing:
npm ERR! path C:\Users\***\Documents\GitHub\MY_CODE\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\***\Documents\GitHub\MY_CODE\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 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\***\\Documents\\GitHub\\MY_CODE\\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.6.1 | win32 | 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 "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\***\Documents\GitHub\MY_CODE\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\***\Documents\GitHub\MY_CODE\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:195:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\***\Documents\GitHub\MY_CODE\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\***\Documents\GitHub\MY_CODE\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\***\Documents\GitHub\MY_CODE\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:195:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Python39\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Python39\python.EXE -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: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
"--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\****\Documents\GitHub\MY_CODE\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.6.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
Why does the npm install fail? It seems I have to update some components, maybe python. If so, how do i do that? I want to reach a point where i can run npm start smoothly.
I faced the same issue few weeks ago.
Deleting package-lock.json or yarn.lock and installing stable node v14 should fix this.
ABC$ sudo npm install -g angular-cli#latest
npm WARN deprecated angular-cli#1.0.0-beta.28.3: angular-cli has been
renamed to #angular/cli. Please update your dependencies.
npm WARN deprecated minimatch#2.0.10: Please update to minimatch
3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng
> fsevents#1.1.3 install /usr/local/lib/node_modules/angular-
cli/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v51-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.3 and node#7.8.0 (node-v51 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js" "clean"
gyp ERR! cwd /usr/local/lib/node_modules/angular-cli/node_modules/fsevents
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js clean' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/angular-cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/angular-cli/node_modules/fsevents
node-pre-gyp ERR! node -v v7.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js clean' (1)
node-sass#4.6.1 install /usr/local/lib/node_modules/angular-cli/node_modules/node-sass
node scripts/install.js
Unable to save binary /usr/local/lib/node_modules/angular-cli/node_modules/node-sass/vendor/darwin-x64-51 : { Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/angular-cli/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:895:18)
at sync (/usr/local/lib/node_modules/angular-cli/node_modules/mkdirp/index.js:71:13)
at Function.sync (/usr/local/lib/node_modules/angular-cli/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/usr/local/lib/node_modules/angular-cli/node_modules/node-sass/scripts/install.js:111:11)
at Object.<anonymous> (/usr/local/lib/node_modules/angular-cli/node_modules/node-sass/scripts/install.js:154:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/local/lib/node_modules/angular-cli/node_modules/node-sass/vendor' }
node-sass#4.6.1 postinstall /usr/local/lib/node_modules/angular-cli/node_modules/node-sass
node scripts/build.js
Building: /usr/local/bin/node /usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli '/usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp#3.6.2
gyp info using node#7.8.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:80:29)
gyp verb `which` failed at /usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:89:16
gyp verb `which` failed at /usr/local/lib/node_modules/angular-cli/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /usr/local/lib/node_modules/angular-cli/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:114:15)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:80:29)
gyp verb `which` failed at /usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:89:16
gyp verb `which` failed at /usr/local/lib/node_modules/angular-cli/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /usr/local/lib/node_modules/angular-cli/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:114:15)
gyp verb `which` failed stack: 'Error: not found: python2\n at
getNotFoundError (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:13:12)\n at F (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:68:19)\n at E (/usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:80:29)\n at /usr/local/lib/node_modules/angular-cli/node_modules/which/which.js:89:16\n at /usr/local/lib/node_modules/angular-cli/node_modules/isexe/index.js:42:5\n at /usr/local/lib/node_modules/angular-cli/node_modules/isexe/mode.js:8:5\n at FSReqWrap.oncomplete (fs.js:114:15)',
gyp verb which failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which succeeded python /usr/bin/python
gyp verb check python version /usr/bin/python -c "import platform; print(platform.python_version());" returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 7.8.0
gyp verb command install [ '7.8.0' ]
gyp verb install input version string "7.8.0"
gyp verb install installing version: 7.8.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 7.8.0
gyp verb build dir attempting to create "build" dir: /usr/local/lib/node_modules/angular-cli/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/angular-cli/node_modules/node-sass/build'
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/local/lib/node_modules/angular-cli/node_modules/node-sass
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN #angular/core#2.4.10 requires a peer of rxjs#^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/angular-cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 install: node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.6.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.6.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ABC/.npm/_logs/2017-11-12T09_23_09_328Z-debug.log
You're installing the wrong version of the cli.
npm WARN deprecated angular-cli#1.0.0-beta.28.3: angular-cli has been
renamed to #angular/cli.
You should do this instead:
npm uninstall -global angular-cli #angular/cli
npm install -global #angular/cli