unable to install skpm on Mac - npm

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.

Related

Any help is much appreciated. While installing Hyperledger composer getting the below error:

ERROR RECEIVED BELOW:
npm install -g composer-cli#0.20
npm ERR! 3 errors generated.
npm ERR! make: *** [Release/obj.target/api/src/node_report.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/composer-cli/node_modules/node-report
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
Do not use composer. It's deprecated long time back.

NPM configure error due to Homebrew Python Install

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

Failed while installing tfjs-node using macOS and node-gyp rebuild failed

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

GYP issue installing yo hyperledger

I can't install hyperledger on windows 10 using VSCode because I keep getting a error when I try to install the generator with Yo.
This is the error:
\AppData\Roaming\npm\node_modules\generator-hyperledger-composer\node_modules\pkcs11js>if not defined npm_config_node_gyp
(node "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
The system cannot find the path specified.
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\program files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Robert\AppData\Roaming\npm\node_modules\generator-hyperledger-composer\node_modules\pkcs11js
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js#1.0.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.17 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thanks for the help!

hiredis install rebuild fail

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.