-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm install error!!! #21
Comments
same - after upgrading to latest version of Node this module no longer works. |
I haven't had time to look into this too much, but a quick test on a MacBook pro doesn't experience the same issue:
Steve |
Hey Steve, I see you're on node v.4.4.3 whereas I am on 5.10.1 Attached is my debug log. Hope it helps! |
What version of Python are you using? |
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) |
Hi Stephen, should I try updating Python? |
Yes, I would say yes, python 2.7 is recommended by node-gyp and that's what I use. I have installed successfully with node 5.11.0 using npm 3.8.6 and python 2.7. |
I have a problem here (don't think it's the same as @tinnocente), and i have node, npm and python updated (same versions you pointed above). Any thoughts? C:\node\watchbot>npm install net-ping --save > raw-socket@1.4.0 install C:\node\watchbot\node_modules\raw-socket > node-gyp rebuild C:\node\watchbot\node_modules\raw-socket>if not defined npm_config_node_gyp (nod e "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules \node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available too ls versions are "4.0". gyp ERR! build error gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe ` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:276:23) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:204:12) gyp ERR! System Windows_NT 6.3.9600 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\node\watchbot\node_modules\raw-socket gyp ERR! node -v v5.11.0 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm WARN watchbot@1.0.0 No repository field. npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "install" "net-ping" "--save" npm ERR! node v5.11.0 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE npm ERR! raw-socket@1.4.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the raw-socket@1.4.0 install script 'node-gyp rebuild'. 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 raw-socket 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 information on how to open an issue for this project with: npm ERR! npm bugs raw-socket npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls raw-socket npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\node\watchbot\npm-debug.log C:\node\watchbot> Debug log: npm-debug.txt |
Solved. As the error message says, MSBUILD was using the wrong tools, so googling it up, i just had to install Microsoft Visual Studio 2013 with C++ redist (you can found it here) and that was it. Someone can find this thread very helpful. Thanks anyway! |
Updated Python: Python 2.7.11 (default, Apr 27 2016, 15:42:44) Producing the same build error. Must be something with my environment. Appreciate any ideas. |
I would suggest checking out the git repo for raw-socket (this is what is failing to build), and try to build by hand, e.g.:
Sometimes I find npm hides build errors, this should reveal them. |
@tinnocente Try to use the latest version of node and npm. As i can see in the log file, you've installed the node version 5.10.1 and the npm version 3.8.3 (node version 5.11.0 and npm version 3.8.6 are already available). If that fails, try to do what @stephenwvickers says. |
I've also found in the past upgrades of the node binary may result in node-gyp build failures where globally installed modules need to be upgraded (I have no data to back this up). Upgrading the Visual Studio version after installing node may also cause you an issue (passing "--msvs_version=..." at the command prompt can help here). |
Problem is in raw-socket dependency. There is "nan": "2.0.*" dependency in package.json, but it's old version don't work in node 6. I have manually change nan version in raw-sockets dependency from "nan": "2.0." to "nan": "2.3."
EDIT: raw-socket updated Now we can put working raw-socket in this package and it will work fine. |
@dimonnwc3 brilliant! that worked. Should update npm registry with correct version of raw-socket. Thanks (all) for your help. |
Version 1.5.0 of raw-socket has been published to npm |
To make sure platform specific newlines ('\r\n' or '\r') are converted to '\n' which otherwise will fail eval(). This should handle multiple issues reported on syntax error reading binding.gyp (partial list): nodejs#979 nodejs#199 nospaceships/node-net-ping#24 nospaceships/node-net-ping#21 mathiask88/node-snap7#11 node-hid/node-hid#28 xdenser/node-firebird-libfbclient#24
To make sure platform specific newlines ('\r\n' or '\r') are converted to '\n' which otherwise will fail eval(). This should handle multiple issues reported on syntax error reading binding.gyp (partial list): #979 #199 nospaceships/node-net-ping#24 nospaceships/node-net-ping#21 mathiask88/node-snap7#11 node-hid/node-hid#28 xdenser/node-firebird-libfbclient#24 PR-URL: #1053 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
To make sure platform specific newlines ('\r\n' or '\r') are converted to '\n' which otherwise will fail eval(). This should handle multiple issues reported on syntax error reading binding.gyp (partial list): nodejs#979 nodejs#199 nospaceships/node-net-ping#24 nospaceships/node-net-ping#21 mathiask88/node-snap7#11 node-hid/node-hid#28 xdenser/node-firebird-libfbclient#24 PR-URL: nodejs#1053 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
To make sure platform specific newlines ('\r\n' or '\r') are converted to '\n' which otherwise will fail eval(). This should handle multiple issues reported on syntax error reading binding.gyp (partial list): nodejs#979 nodejs#199 nospaceships/node-net-ping#24 nospaceships/node-net-ping#21 mathiask88/node-snap7#11 node-hid/node-hid#28 xdenser/node-firebird-libfbclient#24 PR-URL: nodejs#1053 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
net-ping is not working with node.js version 12.18.1. Does anybody has any solution? |
./npm install net-ping
-|/-|/-|/-|/--|/-|/-|/--\
Traceback (most recent call last):
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in
sys.exit(gyp.script_main())
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 545, in script_main
return main(sys.argv[1:])
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 538, in main
return gyp_main(args)
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 514, in gyp_main
options.duplicate_basename_check)
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 130, in Load
params['parallel'], params['root_targets'])
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2775, in Load
variables, includes, depth, check, True)
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
includes, True, check)
File "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 243, in LoadOneBuildFile
None)
File "binding.gyp", line 1
{
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error:
gyp
failed with exit code: 1gyp ERR! stack at ChildProcess.onCpExit (/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
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.32-431.el6.x86_64
gyp ERR! command "/home/node-v4.4.3-linux-x64/bin/node" "/home/node-v4.4.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/node-v4.4.3-linux-x64/bin/node_modules/net-ping/node_modules/raw-socket
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 2.6.32-431.el6.x86_64
npm ERR! argv "/home/node-v4.4.3-linux-x64/bin/node" "/home/node-v4.4.3-linux-x64/bin/npm" "install" "net-ping"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! raw-socket@1.4.0 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raw-socket@1.4.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the raw-socket 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 information on how to open an issue for this project with:
npm ERR! npm bugs raw-socket
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls raw-socket
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/node-v4.4.3-linux-x64/bin/npm-debug.log
The text was updated successfully, but these errors were encountered: