I am trying to install node-gyp, and I have this error :
I am using XCode 7.1, I tried to downgrade my version of NodeJS but it doesn't work.
I have been looking over on the internet for solutions but I cannot find any.
npm WARN package.json myk#1.0.0 No repository field.
npm WARN package.json myk#1.0.0 No README data
npm WARN package.json myk#1.0.0 No license field.
npm WARN package.json Dependency 'gulp' exists in both dependencies and devDependencies, using 'gulp#^3.5.6' from dependencies
contextify#0.1.14 install /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/node_modules/gulp-dom/node_modules/jsdom/node_modules/contextify
node-gyp rebuild
CXX(target) Release/obj.target/contextify/src/contextify.o
SOLINK_MODULE(target) Release/contextify.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/contextify.node] 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: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 Darwin 15.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/node_modules/gulp-dom/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.12.6
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Applications/XAMPP/xamppfiles/htdocs/MYKapp/MYK/ionic/MYK/npm-debug.log
I had the same problem and what worked for Emmanuel didn't work for me. In the end, this solved my problem:
cd /usr/local/lib
sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
Originally found under this question
I found the answer :
$ npm install -g npm-check-updates
$ npm-check-updates -u
$ npm install
Related
Today when I run npm install, it fails and gives me the following error log. I know it's an issue with hashtable but I have never had this issue before.
> hashtable#2.0.2 install /Users/admin/myproject/node_modules/hashtable
> node-gyp configure build
CXX(target) Release/obj.target/native/src/hashtable.o
SOLINK_MODULE(target) Release/native.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/native.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/admin/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/admin/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /Users/admin/myproject/node_modules/hashtable
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
myproject#0.0.1 /Users/admin/myproject
└── (empty)
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/Users/admin/.npm-packages/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! hashtable#2.0.2 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hashtable#2.0.2 install script 'node-gyp configure build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hashtable package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hashtable
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hashtable
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/admin/myproject/npm-debug.log
npm ERR! code 1
I thought there might be a problem with node-gyp so I did a npm install node-gyp -g separately but the issue did not go away. Does anyone know how to resolve this?
By the way, I am on Mac,running OSX 10.11.5, also recently installed XCode 6.3.2 for a separate project and can only use this version of XCode, not sure if that is causing the problem.
node-gyp also requires python and xcode on MacOs for C++ compilation. There are similar requirements for other systems.
You can find the pre-reqs for the node-gyp package on its npm page here.
I am trying to install bcrypt using npm on redHat, I have it working on my Windows dev environment but it fails when I try to port it to the Unix test.
I am running npm intall bcrypt and recieving the following output:
$ ../../nodejs/bin/npm install bcrypt
npm WARN package.json party#0.0.0 No repository field.
npm WARN package.json party#0.0.0 No README data
-
> bcrypt#0.8.0 install /app/party/site/node_modules/bcrypt
> node-gyp rebuild
make: Entering directory `/app/party/site/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: execvp: g++: Not a directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 127
make: Leaving directory `/app/party/site/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/app/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 2.6.18-371.el5
gyp ERR! command "node" "/app/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/party/site/node_modules/bcrypt
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
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 2.6.18-371.el5
npm ERR! command "/app/nodejs/bin/node" "/app/nodejs/bin/npm" "install" "bcrypt"
npm ERR! cwd /app/party/site
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /app/party/site/npm-debug.log
npm ERR! not ok code 0
I have been Googling for hours, but cannot work out why this is failing - please help!
Okay, thanks, I have got this working, the version of GCC I was running did not include g++, unfortunately I do not have root on this box so had to install easybuild and then use that to install a new version of GCC, then include that version in the PATH, after that the npm install bcrypt worked perfectly.
I have run into an unusal problem when trying to install pty.js using node:
If I run npm install pty.js I receive this error:
> node-gyp rebuild
CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:487:10: error: use of undeclared identifier 'openpty'
return openpty(amaster, aslave, name, (termios *)termp, (winsize *)winp);
^
../src/unix/pty.cc:533:10: error: use of undeclared identifier 'forkpty'
return forkpty(amaster, name, (termios *)termp, (winsize *)winp);
^
2 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.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:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.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/otiswright/Developer/Projects/Web/Hatchway/node_modules/pty.js
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! pty.js#0.2.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js#0.2.4 install script.
npm ERR! This is most likely a problem with the pty.js 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 pty.js
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "pty.js"
npm ERR! cwd /Users/otiswright/Developer/Projects/Web/Hatchway
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.5.0-alpha-4
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/otiswright/Developer/Projects/Web/Hatchway/npm-debug.log
npm ERR! not ok code 0
I have node-gyp installed am running OS X with xcode + commandlines installed.
I am not sure where the problem is occurring? Could be dependencies.
I had the same issue with a different node package devtools-terminal.
The problem is that a header file is configured incorrectly for OSX as explained here.
This is the work around I use:
mkdir /tmp/pty.js
git clone https://github.com/chjj/pty.js.git /tmp/pty.js
vi /tmp/pty.js/src/unix/pty.cc
replace line 39: #include <util.h> with #include "/usr/include/util.h"
npm install -g /tmp/pty.js
and now npm install -g devtools-terminal should work.
This way you fix the issue in pty.js and use your local copy as the dependency for the package you with to install.
Good luck!
I can't install any packages that requires node-gyp. The error message goes like this
$ npm install node-protobuf
info trying registry request attempt 1 at 22:43:57
http GET https://registry.npmjs.org/node-protobuf
http 200 https://registry.npmjs.org/node-protobuf
npm http GET https://registry.npmjs.org/node-protobuf/-/node-protobuf-1.0.8.tgz
npm http 200 https://registry.npmjs.org/node-protobuf/-/node-protobuf-1.0.8.tgz
> node-protobuf#1.0.8 install /home/whs/node_modules/node-protobuf
> node-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Linux 2.6.32-5-amd64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/whs/node_modules/node-protobuf
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! node-protobuf#1.0.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-protobuf#1.0.8 install script.
npm ERR! This is most likely a problem with the node-protobuf 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 node-protobuf
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-5-amd64
npm ERR! command "node" "/usr/local/bin/npm" "install" "node-protobuf"
npm ERR! cwd /home/whs/
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/whs/npm-debug.log
npm ERR! not ok code 0
I also tried the protobuf package and got the exact same result.
Most search result says that this error is from missing make but in my case I have make installed. The node installation is even built from source manually on the machine.
Additional info:
Path: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Make: GNU Make 3.81 installed in /usr/bin/make (from official Debian package)
Distro: Debian 6.0.8
Arch: amd64
Build-essential package: installed
Node: Manually built from source
Installation of non-gyp packages: work normally
I have found that I set 0754 permission on /usr/bin/make and a bug in which skip the file due to user's primary group is not the same as make's. I have filed a bug in node-which.
After installing OS X Mountain Lion and XCode, I'm getting this error:
Jonathans-MacBook-Air:fme jong$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt/0.7.0
npm http 304 https://registry.npmjs.org/bcrypt/0.7.0
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0
> bcrypt#0.7.0 install /Users/jong/Workspace/fme/node_modules/bcrypt
> node-gyp rebuild
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: c++: No such file or directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.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:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 12.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jong/Workspace/fme/node_modules/bcrypt
gyp ERR! node -v v0.8.4
gyp ERR! node-gyp -v v0.6.1
gyp ERR! not ok
npm ERR! bcrypt#0.7.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the bcrypt#0.7.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 Darwin 12.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /Users/jong/Workspace/fme
npm ERR! node -v v0.8.4
npm ERR! npm -v 1.1.45
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jong/Workspace/fme/npm-debug.log
npm ERR! not ok code 0
I have a feeling that it doesn't know which compiler to use. How do I fix this?
Apparently I just need to install the Command Line Tools from the downloads panel in XCode
xCode doesn't bundle command-line tools by default. Apple explains it in their documentation.
The problem may be that your Node.Js is version 0.10 and some modules only work with the previous 0.8.22 version which you can get here: http://blog.nodejs.org/2013/03/06/node-v0-8-22-stable/