hiredis install rebuild fail - npm

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.

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.

Can't install appmetrics with npm

I'm trying to install access-watch with no success.
After cloning the repo I call npm i and I get the following error. It appears to occur when the installation process tries to install appmetrics. So I tried npm i appmetrics and got the exact same error, hence the title of this question.
Here's the tail of the trace,
$ cd access-watch
$ npm i
/home/gandalf/.cache/node-gyp/14.18.0/include/node/v8.h:6482:46: note: candidate expects 1 argument, 0 provided
Release/obj.target/appmetrics/geni/appmetrics.cpp: At global scope:
Release/obj.target/appmetrics/geni/appmetrics.cpp:641:13: warning: ‘bool isAppMetricsFile(std::__cxx11::string, std::__cxx11::string)’ defined but not used [-Wunused-function]
static bool isAppMetricsFile(std::string expected, std::string potentialMatch) {
^~~~~~~~~~~~~~~~
Makefile:282: recipe for target 'Release/obj.target/appmetrics/geni/appmetrics.o' failed
make: *** [Release/obj.target/appmetrics/geni/appmetrics.o] Error 1
make: Leaving directory '/home/gandalf/access-watch/node_modules/appmetrics/build'
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/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 4.15.0-66-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gandalf/access-watch/node_modules/appmetrics
gyp ERR! node -v v14.18.0
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appmetrics#4.0.1 install: `node extract_all_binaries.js || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appmetrics#4.0.1 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/gandalf/.npm/_logs/2021-10-11T13_41_15_454Z-debug.log
And here's the full thing: https://pastebin.com/cYsHa1EP
I know node-gyp must be installed and it is:
$ node-gyp --version
v8.2.0
I found an issue in appmetric's github and ran with CC=gcc-9 but to no success.
Thanks!

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!

unable to install skpm on Mac

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.

Error while trying to install ursa with npm

I have this error when i try to install ursa (RSA public/private key OpenSSL bindings for node and io.js)
gyp: Call to 'node -e "require('nan')"' returned exit status 1. 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/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-39-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/saad/Bureau/kevinIdP/node_modules/ursa
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 1
npm ERR! not ok code 0
Do i have to add some dependencies ?
Thanks for the interest