I recently installed conda via Homebrew on my machine and I noticed that every time I run npm install commands, npm is triggering an error that references a python command from my conda directory, but the install finished with success. Has anyone faced this issue and know how to prevent the error message from being triggered every time?
Here is an example:
npm i webpack -g
/Users/user/.nvm/versions/node/v10.16.1/bin/webpack -> /Users/user/.nvm/versions/node/v10.16.1/lib/node_modules/webpack/bin/webpack.js
> fsevents#1.2.11 install /Users/user/.nvm/versions/node/v10.16.1/lib/node_modules/webpack/node_modules/fsevents
> node-gyp rebuild
Then the Python is triggered:
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/local/Caskroom/miniconda/base/bin/python -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 at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:389:11)
gyp ERR! stack at Socket.emit (events.js:198:13)
gyp ERR! stack at Pipe._handle.close (net.js:606:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/user/.nvm/versions/node/v10.16.1/bin/node" "/Users/user/.nvm/versions/node/v10.16.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/user/.nvm/versions/node/v10.16.1/lib/node_modules/webpack/node_modules/fsevents
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules/webpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
And finally the package install was successful:
+ webpack#4.41.4
added 1 package from 1 contributor, removed 1 package and updated 34 packages in 11.622s
Related
I have wsl2(ubunto) and using windows terminal I try to install insomnonia inso using the command "npm i -g insomnia-inso"
how ever I get error
Could not run curl-config, please make sure libcurl dev package is installed.
Output: /bin/sh: 1: curl-config: not found
gyp: Call to 'node /usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/tools/curl-config.js --prefix' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.128-microsoft-standard
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v79"
gyp ERR! cwd /usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl
gyp ERR! node -v v13.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/insomnia-inso/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1026:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.19.128-microsoft-standard
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/insomnia-inso/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl
node-pre-gyp ERR! node -v v13.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules/insomnia-inso/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-libcurl#2.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-libcurl#2.2.0 install 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/limbido/.npm/_logs/2020-12-16T08_08_44_621Z-debug.log
I still have the same error after trying
"sudo npm i -g insomnia-inso --unsafe-perm"
this command works for me
sudo npm i -g insomnia-inso -unsafe-perm --allow-root
I am working on a react native project and wants to install react navigation library for this I am trying to do npm install first but I am not able to do it.
node version: v12.4.0
npm version: 6.9.0
I am getting the following error:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.9 and node#12.4.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /anaconda3/bin/python -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:290:12)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:430:11)
gyp ERR! stack at Socket.emit (events.js:200:13)
gyp ERR! stack at Pipe.<anonymous> (net.js:586:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/pankaj.sachdeva/.nvm/versions/node/v12.4.0/bin/node" "/Users/pankaj.sachdeva/.nvm/versions/node/v12.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/pankaj.sachdeva/.nvm/versions/node/v12.4.0/bin/node /Users/pankaj.sachdeva/.nvm/versions/node/v12.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:200:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/Users/pankaj.sachdeva/.nvm/versions/node/v12.4.0/bin/node" "/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents
node-pre-gyp ERR! node -v v12.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/pankaj.sachdeva/.nvm/versions/node/v12.4.0/bin/node /Users/pankaj.sachdeva/.nvm/versions/node/v12.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/pankaj.sachdeva/Desktop/HD/ReactNative/instaClone/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN #react-navigation/native#3.5.0 requires a peer of react-native-gesture-handler#* but none is installed. You must install peer dependenciesyourself.
npm WARN react-navigation-drawer#1.2.1 requires a peer of react-native-gesture-handler#^1.0.12 but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-stack#1.4.0 requires a peer of react-native-gesture-handler#^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
I'm trying to install tfjs-node via npm install #tensorflow/tfjs-node on my mac.
I'm getting following error while trying to installing it.
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/ReffasCode/anaconda3/bin/python -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:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:389:11)
gyp ERR! stack at Socket.emit (events.js:189:13)
gyp ERR! stack at Pipe._handle.close (net.js:597:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ReffasCode/Desktop/ip2_ss19/Server/node_modules/#tensorflow/tfjs-node
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
OK, getting more information from https://github.com/nodejs/node-gyp it seems like node-gyp is not supporting Python version 3.x.x is not supported.
So if you having the same error try to specify which Python version to use:
npm config set python /usr/bin/python
I am unable to install SKPM on mac using the following command
npm install -g skpm
here is the output
npm install -g skpm
/Users/new/.npm-global/bin/skpm -> /Users/new/.npm
global/lib/node_modules/skpm/lib/index.js > keytar#4.3.0 install /Users/new/.npm-global/lib/node_modules/skpm/node_modules/keytar >
prebuild-install || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=11.1.0 runtime=node arch=x64 platform=darwin)
gyp ERR! configure error
gyp ERR! stack Error: Command failed:
/Users/new/anaconda/anaconda3/bin/python -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:289:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:387:11)
gyp ERR! stack at Socket.emit (events.js:182:13)
gyp ERR! stack at Pipe._handle.close (net.js:611:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/11.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/new/.npm- global/lib/node_modules/skpm/node_modules/keytar
gyp ERR! node -v v11.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keytar#4.3.0 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keytar#4.3.0 install 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/new/.npm/_logs/2018-11-11T01_39_22_458Z-debug.log
I have Xcode and command line tools installed and OSX version is 10.13.6.
not sure how to fix this.
I'm trying to install hiredis through npm on a mac and I am getting this error. I know there are some possible duplicates of this but I've tried other solutions and they have not worked for me. Here is the log:
11 warnings and 17 errors generated.
make: *** [Release/obj.target/hiredis/src/hiredis.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Aric/myApp/node_modules/hiredis
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hiredis#0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hiredis#0.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Maybe not the correct way to fix my problem but I upgraded hiredis to v0.5.0 from v0.3.0 and it solved the issue for me.