I have to use node-usb in electron.atom to use that I am trying to install node-gyp and I am facing a Issue.
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Name\AppData\Roamin
g\npm\node_modules\node-gyp\lib\configure.js:336:16)
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_proces
s.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\name\\
AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\Name\Desktop\electron-quick-start
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
I found few same tickets on stackoverflow I have tried them all. Still No success.
Has anyone found any solution for this problem.
I suggest that you narrow down the possible causes to the failure by following the steps in this Github Issue from node-gyp:
xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools
Hope this helps.
Related
when trying to run below command to install java dependencies for NPM it is giving the whole bunch of errors.
NPM install -g java
Someone please help me to rectify the error.
C:\WINDOWS\system32>npm i -g java
java#0.12.2 install C:\Dev\Software\npm-repository\npm\node_modules\java
node-gyp rebuild
C:\Dev\Software\npm-repository\npm\node_modules\java>if not defined npm_config_node_gyp (node "C:\Dev\Software\npm-repository\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Dev\Software\npm-repository\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and
gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad
gyp ERR! stack network settings.
gyp ERR! stack at Request.<anonymous> (C:\Dev\Software\npm-repository\npm\node_modules\npm\node_modules\node-gyp\lib\install.js:171:21)
gyp ERR! stack at Request.emit (events.js:315:20)
gyp ERR! stack at Request.onRequestError (C:\Dev\Software\npm-repository\npm\node_modules\npm\node_modules\request\request.js:881:8)
gyp ERR! stack at ClientRequest.emit (events.js:315:20)
gyp ERR! stack at TLSSocket.socketErrorListener (_http_client.js:469:9)
gyp ERR! stack at TLSSocket.emit (events.js:315:20)
gyp ERR! stack at emitErrorNT (internal/streams/destroy.js:106:8)
gyp ERR! stack at emitErrorCloseNT (internal/streams/destroy.js:74:3)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Dev\\Software\\npm-repository\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Dev\Software\npm-repository\npm\node_modules\java
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java#0.12.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java#0.12.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Try executing npm i -g node-gyp first and then execute the above command.
Comment if you get any errors!
VPN connection is a common cause of these npm i errors. Try running the command disconnected from the VPN.
When I run npm install I see following error, I am running Angular app
> strong-ursa#0.10.1 install C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa
> node-gyp rebuild
C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa>if not defined npm_config_node_gyp (node "C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
ursaNative.cc
win_delay_load_hook.cc
c:\ansysdev\licensingexternal\node_modules\strong-ursa\src\ursanative.cc(484): warning C4244: 'argument': conversion from 'ssize_t' to 'i
nt', possible loss of data [C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa\build\ursaNative.vcxproj]
c:\ansysdev\licensingexternal\node_modules\strong-ursa\src\ursanative.cc(504): warning C4244: 'argument': conversion from 'ssize_t' to 'i
nt', possible loss of data [C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\ANSYSDev\LicensingExternal\node_modules\strong
-ursa\build\ursaNative.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
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.17763
gyp ERR! command "C:\\cygwin64\\home\\kjeeva\\ANSYSDev\\Licensing194\\LicensingPortalInternal\\node\\node-v8.12.0-win-x64\\node.exe" "C:\\cygwin64\\home\\kjeeva\\ANSYSDev\\Licensing194\\LicensingPortalInternal\\node\\node-v8.12.0-win-x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
I am not sure what to do with this error
I use npm install node-gyp and it run well , but when I use npm to install zmq, the node-gyp rebuild fail and the error below. I need the /zmq/build for my program to run.
I try reinstall the node-gyp but didn't work. Is anyone met this situation before?
zmq#2.15.3 install /lib/jinteki/netrunner/node_modules/zmq
node-gyp rebuild
make: Entering directory `/lib/jinteki/netrunner/node_modules/zmq/build'
CXX(target) Release/obj.target/zmq/binding.o../binding.cc:28:17: fatal
error: zmq.h: No such file or directory
#include <zmq.h>
^
compilation terminated.
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory `/lib/jinteki/netrunner/node_modules/zmq/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:276: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:204:12)
gyp ERR! System Linux 3.13.0-86-generic
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 /lib/jinteki/netrunner/node_modules/zmq
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
You don't have the appropriate zeromq library headers installed. The name of the package that provides these headers varies depending on your platform/distro. See the zmq readme for complete installation instructions.
I am using redhat5.9. I found the 'make' related exception. I am wondering what are they making? I think they are just javascript relatd stuff.
[root#xxxx bin]# npm install -g sinopia --python=/usr/local/clo/ven/python-2.7.11/bin/python
> crypt3#0.1.8 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/.node-gyp"
make: Entering directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/build'
CXX(target) Release/obj.target/crypt3/crypt3.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *** [Release/obj.target/crypt3/crypt3.o] Error 1
make: Leaving directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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 Linux 2.6.18-406.el5
gyp ERR! command "/usr/local/clo/ven/node-v4.2.3-linux-x64/bin/node" "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
> fs-ext#0.4.5 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext
> node-gyp configure build
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/.node-gyp"
make: Entering directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/build'
CXX(target) Release/obj.target/fs-ext/fs-ext.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *** [Release/obj.target/fs-ext/fs-ext.o] Error 1
make: Leaving directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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 Linux 2.6.18-406.el5
gyp ERR! command "/usr/local/clo/ven/node-v4.2.3-linux-x64/bin/node" "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing crypt3#0.1.8
npm WARN optional dep failed, continuing fs-ext#0.4.5
-
> dtrace-provider#0.4.0 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js
First install gyp globally using sudo, then install module
sudo npm install -g gyp
sudo npm install /your module/
I am trying to implement a requirement on node-xmpp-server, but i am facing issue while installing this module. I have read the blog on how to install and read few other blog posts too, but nothing is helping me out.
When I am trying to use npm install with the dependency mentioned in package.json or if I explicitly install the module, i am getting following error:
> node-stringprep#0.5.2 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1071:5)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! node-stringprep#0.5.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-stringprep#0.5.2 install script.
npm ERR! This is most likely a problem with the node-stringprep 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-stringprep
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-xmpp-server"
npm ERR! cwd /home/gaurav/NodeOffcRepo/chatPro
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
|
> node-expat#2.3.1 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Socket.<anonymous> (child_process.js:1167:11)
gyp ERR! stack at Socket.emit (events.js:107:17)
gyp ERR! stack at Pipe.close (net.js:461:12)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gaurav/NodeOffcRepo/chatPro/npm-debug.log
npm ERR! not ok code 0
My node version is: v0.13.0-pre
If some more info is needed, please comment.
Check if the dependencies of node-xmpp module is installed.
Try to see node xmpp documentation
You need to install first node-expat which is dependent of libexpat library. I tried
yum install libexpat
but it does not exist. I was able to find another library which helps.
Try:
(for CentOS)
yum install libicu-devel
(for Debian 6 system)
apt-get install libicu-dev
Then
npm install node-expat
Then you can install node-xmpp module.