I'm trying to start learning blockchain development using Hyperledger but have run into an installation error. It seems to be a problem with grpc but I can't figure out exactly where the problem lies. Any help would be much appreciated.
1 error generated.░⸩ ⠴ install: info lifecycle grpc#1.10.1~install: Failed to exec install script
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/oscarstein/.nvm/versions/node/v10.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! command "/Users/oscarstein/.nvm/versions/node/v10.5.0/bin/node" "/Users/oscarstein/.nvm/versions/node/v10.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/oscarstein/.nvm/versions/node/v10.5.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/oscarstein/.nvm/versions/node/v10.5.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/oscarstein/.nvm/versions/node/v10.5.0/lib/node_modules/composer-cli/node_modules/grpc
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.10.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! /Users/oscarstein/.npm/_logs/2018-07-02T19_06_50_653Z-debug.log
You need to be using the current LTS version which is currently Node version 8. You can use nvm to install the latest lts version with the command nvm install --lts
Related
I am encountering an error whilst attempting to install the requirements for a package I am working on, it gets to integer#2.1.0 and then fails due to an error with node-gyp.
Node Version: 10.10.0 / 6.4.1
Platform: Darwin Matts-MBP-3.local 19.0.0 Darwin Kernel Version 19.0.0: Fri May 24 17:36:10 PDT 2019; root:xnu-6041.0.0.111.5~1/RELEASE_X86_64 x86_64
Compiler: Apple clang version 11.0.0 (clang-1100.0.20.17)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
> integer#2.1.0 install /Users/mattcowley/WebstormProjects/MagicCap/node_modules/integer
> node-gyp rebuild
make: *** No rule to make target `../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', needed by `Makefile'. Stop.
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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/Cellar/node/10.10.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mattcowley/WebstormProjects/MagicCap/node_modules/integer
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! integer#2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer#2.1.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/mattcowley/.npm/_logs/2019-06-16T10_33_53_751Z-debug.log
2019-06-16T10_33_53_751Z-debug.log
Any help on how to resolve this issue would be greatly appreciated!
I have also reached out and raised an issue with node-gyp but thought posting here might yield an answer sooner :)
Try adding this to your binding.gyp:
'include_dirs': ["<!#(node -p \"require('node-addon-api').include\")"],
I'm trying to install the nodetime module (for node), but when I do, I get the following compilation error:
make: *** [Release/obj.target/nodetime_native/src/nodetime_native.o]
Error 1 make: Leaving directory
/home/fernando/node_modules/nodetime-native/build' gyp ERR! build
error gyp ERR! stack Error:make` failed with exit code: 2 gyp ERR!
stack at ChildProcess.onExit
(/home/fernando/apps/node-v0.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR!
stack at Process.ChildProcess._handle.onexit
(child_process.js:1074:12) gyp ERR! System Linux 3.13.0-53-generic gyp
ERR! command "node"
"/home/fernando/apps/node-v0.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild" gyp ERR! cwd /home/fernando/node_modules/nodetime-native gyp
ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm
ERR! Linux 3.13.0-53-generic npm ERR! argv "/usr/local/bin/node"
"/usr/local/bin/npm" "i" "nodetime-native" npm ERR! node v0.12.2 npm
ERR! npm v2.7.4 npm ERR! code ELIFECYCLE
npm ERR! nodetime-native#0.1.0 install: node-gyp rebuild npm ERR!
Exit status 1 npm ERR! npm ERR! Failed at the nodetime-native#0.1.0
install script 'node-gyp rebuild'. npm ERR! This is most likely a
problem with the nodetime-native package, npm ERR! not with npm
itself. npm ERR! Tell the author that this fails on your system: npm
ERR! node-gyp rebuild npm ERR! You can get their info via: npm
ERR! npm owner ls nodetime-native npm ERR! There is likely
additional logging output above.
Looking around, it would seem like I need to have Python installed, which I do (both 2.7 and 3.4) and make and gcc, which I do.
What else could be happening here?
You also need to make sure the Python executable you reach via your PATH environment variable leads to the 2.x version.
I believe node-gyp isn't working well with the 3.x version of Python.
I have used johnny-five to blink a led with a button. I want to blink it with a button of the xBox pad so I found npm xbox-controller but I cannot install it in Ubuntu 14.04. I get this error:
**compilation terminated.
make: *** [Release/obj.target/hidapi/hidapi/libusb/hid.o] Error 1
make: Leaving directory `/home/villalpando/xbox/node_modules/node-hid/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.16.0-37-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "install"
gyp ERR! cwd /home/villalpando/xbox/node_modules/node-hid
gyp ERR! node -v v0.10.38
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Linux 3.16.0-37-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "node-hid"
npm ERR! node v0.10.38
npm ERR! npm v2.9.0
npm ERR! code ELIFECYCLE
npm ERR! node-hid#0.3.2 install: `sh install.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid#0.3.2 install script 'sh install.sh'.
npm ERR! This is most likely a problem with the node-hid package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! sh install.sh
npm ERR! You can get their info via:
npm ERR! npm owner ls node-hid
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/villalpando/xbox/npm-debug.log**
Is there another way to do it?
I found the answer here http://www.codeitive.com/0zzejPjkVg/npm-fail-to-install-nodehid-faild-to-install-last-version-of-nodejs.html it seems that my node.js was just too old to support node-hid thanks
When I attempt to install memwatch from npm with npm install memwatch I receive these errors before it fails completely:
gyp WARN EACCES user does not have permission to access the dev dir "~/.node-gyp/0.12.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/var/folders/bf/_rxhpvq936b1vxf9ylygj86r0000gn/T/.node-gyp"
and
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:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/cmlewis95/Dropbox/Programming/Projects/Markdown/node_modules/memwatch
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "memwatch"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! memwatch#0.2.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memwatch#0.2.2 install script 'node-gyp rebuild'.
When I go to the location which it says it doesn't have access to, the version number listed in the error is not a directory. I only have a 0.10.13 folder there. I assumed I just needed to update node-gyp but all of the documentation I found on that did not solve the issue. Thanks.
If you happened to use Window, make it sure your opening commanding prompt as administrators access. By most chances if you using either Linux or OSX, try add a prefix sudo in front of your command,
sudo npm install memwatch
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:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1045:12)
gyp ERR! System Linux 3.2.0-40-virtual
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/grooform/fungroo/node_modules/bcrypt
gyp ERR! node -v v0.11.12
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! bcrypt#0.8.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.0 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-40-virtual
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/ubuntu/grooform/fungroo
npm ERR! node -v v0.11.12
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/grooform/fungroo/npm-debug.log
npm ERR! not ok code 0
I have installed libcurl4-openssl-dev too but still m getting same error
also i have installed python and set HOME to point to /home/ubuntu
can you please help..
TRIED ON A FRESH UBUNTU
getting following error
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
npm http 304 https://registry.npmjs.org/pause/0.0.1
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.13.0-36-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/fungroo/node_modules/bcrypt
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
nan has issues with some (older) versions of the node v0.11 unstable branch, so you will need to upgrade your unstable node version (v0.11.14 is the latest as of this writing) or use a stable version of node (v0.10.33 as of this writing).