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.
Related
I've upgraded my node version from 10 to 12.7 after which my LDAP module did not work.When i tried to install the latest LDAP version i got the below error
npm install LDAP
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/ubuntu/node_modules/LDAP/.node-gyp"
make: Entering directory `/home/ubuntu/node_modules/LDAP/build'
CXX(target) Release/obj.target/LDAP/src/LDAP.o
../src/LDAP.cc:10:18: fatal error: ldap.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/LDAP/src/LDAP.o] Error 1
make: Leaving directory `/home/ubuntu/node_modules/LDAP/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: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.2.0-40-virtual
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/node_modules/LDAP
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Linux 3.2.0-40-virtual
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "LDAP"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! LDAP#1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the LDAP#1.2.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the LDAP 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 LDAP
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/npm-debug.log
and when i googled i came across the below thread
https://github.com/jeremycx/node-LDAP/issues/70
which says that The v8 C API has changed dramatically in Node.js 0.12 compared to 0.10. Unfortunately, adaptation of the code would require epic refactoring of the C codebase..
Does that mean that the LDAP module does not support in the latest node or have i missed something .... kindly help
Try this
sudo apt-get install libldap2-dev
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 successfully compiled opencv 3 on my raspberry pi raspbian system. Now i am trying since ages to get node-opencv to install but with not much success.
Here is the error output from npm
npm install -g opencv
|
opencv#1.0.0 install /usr/local/lib/node_modules/opencv
node-gyp rebuild
make: Entering directory '/usr/local/lib/node_modules/opencv/build'
CXX(target) Release/obj.target/opencv/src/init.o
In file included from ../src/init.cc:5:0:
../src/CascadeClassifierWrap.h:5:3: error: ‘CascadeClassifier’ in namespace ‘cv’ does not name a type
In file included from ../src/init.cc:6:0:
../src/VideoCaptureWrap.h:5:7: error: ‘VideoCapture’ in namespace ‘cv’ does not name a type
opencv.target.mk:99: recipe for target 'Release/obj.target/opencv/src/init.o' failed
make: *** [Release/obj.target/opencv/src/init.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/opencv/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/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 3.12.28+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/opencv
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! opencv#1.0.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv#1.0.0 install script.
npm ERR! This is most likely a problem with the opencv 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 opencv
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.12.28+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "opencv"
npm ERR! cwd /usr/local/include/opencv
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I really am out of ideas and would much apprichiate some major help here.
Thanks a lot
best regards Thomas
node-opencv does not fully support OpenCV 3.x yet. They mention it on the readme here. You should be able to install 2.4 on your RPi2 with this tutorial, or search that same site if you have an RPi3.
Running 'sudo npm install' on MAC, I got the error about node-gyp rebuild on the base64#2.1.0 install. Any way to resolve this problem? Please help.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 69
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:810:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client/node_modules/base64
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! base64#2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the base64#2.1.0 install script.
npm ERR! This is most likely a problem with the base64 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 base64
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I have resolved this issue by using older version of node v0.10.40
I was facing similar issue.
Followed the following steps to fix it on MacOS highSierra 10.13:
Downloaded command line tools (MacOS 10.13) for xcode and installed it. Download it from "https://developer.apple.com/download/more/"
Installed xcode 10.0 from the app store. Opened xcode and went through the regular configuration xcode does in the initial start up.
After this it started giving "xcode-select" path issue as stated in the description above. On running command "xcode-select --print-path" it was showing path as '/ Library/Developer/CommandLineTools', so i went ahead and tried "xcode-select --reset" after which the path changed to "/Applications/Xcode.app/Contents/Developer". Immediately after it the build started working without any issues.
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!