-
Notifications
You must be signed in to change notification settings - Fork 47
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
Couldn't install the module. #24
Comments
What version of Python and node-gyp are you using? |
same issue |
also experiencing this |
Having the same problem as well. |
fixed mine by uninstalling python 3.6 or whatever and reinstalling python 2.7. |
This issue is normally experience for 1 of 2 reasons. Either not using Python 2.7 or an upgrade to either node.js or Visual Studio on Windows. Does anyone experiencing this issue not fall under this? I have testing on a clean Linux install using the quote npm and node.js version and it works for me. |
I can reproduce this problem with linux and python < 3.0
|
I've only ever used Python 2.7, so I can't be sure if 2.6 will work. Can you checkout the repo manually and see if you can build it, if not we should see some more useful output from node-gyp:
The raw-socket module is where the problem is, this is used by net-ping. Thanks Steve |
I'm facing the same issue |
Hi, Can you try the steps I gave in my recent comment: Thanks Steve |
Same issue on Ubuntu 11.04 (natty). npm-debug.txt
Executing Executing
Here is the full log: log.txt |
Hi @Franzinator Looking at the top of the log file you can see:
Specifically the message "This version of node/NAN/v8 requires a C++11 compiler". Steve |
Has anyone been able to performed an installation of node-raw-socket from GitHub like @Franzinator. Looking at his debug log NAN is complaining about the compiler not supporting C++11, and I wondered if other people are experiencing the same issue. Please do let me know. |
I build from github on my own pc, and it worked, but i'm new to node, so i can't use it right :D |
try upgrade to gcc/g++ 4.8 |
Hi @stephenwvickers, |
Hi, it is possible a Windows host was used, however I've nevered experienced the issue you described before, I certainly don't see it on my Ubuntu host. What platform, compiler, Python, node, node-gyp and npm versions are you using? Also, does this solution work for anyone else? |
I will publish another version later tonight (UK time) - I will update this issue once I have done this. If you could then test with the new package and let me if it resolved the issue for you. Cheers Steve |
Thanks @stephenwvickers! |
Hi @NimrodGeva So, I've done some testing and I cannot reproduce the issue: [root@gitlab-runner net-ping-test]# ls -l
total 0
[root@gitlab-runner net-ping-test]# node -v
v6.9.1
[root@gitlab-runner net-ping-test]# npm -v
3.10.8
[root@gitlab-runner net-ping-test]# npm install net-ping
> raw-socket@1.5.0 install /home/stephen/projects/net-ping-test/node_modules/raw-socket
> node-gyp rebuild
make: Entering directory `/home/stephen/projects/net-ping-test/node_modules/raw-socket/build'
CXX(target) Release/obj.target/raw/src/raw.o
...
SOLINK_MODULE(target) Release/obj.target/raw.node
COPY Release/raw.node
make: Leaving directory `/home/stephen/projects/net-ping-test/node_modules/raw-socket/build'
/home/stephen/projects/net-ping-test
└─┬ net-ping@1.2.0
└─┬ raw-socket@1.5.0
└── nan@2.3.5
npm WARN enoent ENOENT: no such file or directory, open '/home/stephen/projects/net-ping-test/package.json'
npm WARN net-ping-test No description
npm WARN net-ping-test No repository field.
npm WARN net-ping-test No README data
npm WARN net-ping-test No license field.
[root@gitlab-runner net-ping-test]# ls -l
total 0
drwxr-xr-x. 5 root root 48 Nov 8 20:43 node_modules
[root@gitlab-runner net-ping-test]# cd node_modules/net-ping/
[root@gitlab-runner net-ping]#
[root@gitlab-runner net-ping]# node example/trace-route 10 8.8.8.8
8.8.8.8: 192.168.1.254 (ttl=1 ms=2)
8.8.8.8: RequestTimedOutError: Request timed out (ttl=2 ms=4007)
8.8.8.8: RequestTimedOutError: Request timed out (ttl=3 ms=4006)
8.8.8.8: 31.55.187.184 (ttl=4 ms=8)
8.8.8.8: 195.99.127.26 (ttl=5 ms=7)
8.8.8.8: 195.99.127.3 (ttl=6 ms=7)
8.8.8.8: 195.99.126.105 (ttl=7 ms=7)
8.8.8.8: 216.239.48.113 (ttl=8 ms=8)
8.8.8.8: 216.239.58.95 (ttl=9 ms=9)
8.8.8.8: 8.8.8.8 (ttl=10 ms=10)
8.8.8.8: Done
[root@gitlab-runner net-ping]# So, I think your issue is not related to line endings in the source. Steve |
Hi @stephenwvickers |
What is your python version? python -V |
Python 2.7.6 |
This looks like a similar issue: fuwaneko/node-protobuf#8 |
Hi @NimrodGeva I have not been able to recreate this issue. Can you recreate the issue and post the npm-debug.log file, as well as the console output, from download the repo and using node-gyp configure/install to install manually. Steve |
@rguhanc |
The reason for this failure is that python (used by node-gyp) is throwing a syntax error while trying to eval() the binding.gyp file with dos file endings (\r\n).
Found similar issues with this google query "invalid syntax binding.gyp line 1": In some cases upgrading to python version >=2.7.3 solved it, which makes some sense as it might be when python
But not sure it will be accepted without an explanation of why it is needed for new python. @NimrodGeva I really wonder why it fails for you on python 2.7 - can you try the short python command I wrote above? |
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
I've published a new version of raw-socket to npm, please give this a try. The raw-socket issue for this change is: |
Checked on a CentOS 6 machine, it seems to have done the trick. Thanks! |
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>
@NimrodGeva confirmed new version of raw-socket resolved the issue. Also, I see a change has been made in node-gyp to handle windows style line endings. |
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>
i am using node verison 6.2.0 and my npm version 3.8.9 . And i am trying to install this module in centos 6.7. But i am getting the following error.
(node:11106) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in
sys.exit(gyp.script_main())
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 545, in script_main
return main(sys.argv[1:])
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 538, in main
return gyp_main(args)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 514, in gyp_main
options.duplicate_basename_check)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 130, in Load
params['parallel'], params['root_targets'])
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2775, in Load
variables, includes, depth, check, True)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
includes, True, check)
File "/usr/local/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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305: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_process.js:204:12)
gyp ERR! System Linux 2.6.32-573.12.1.el6.x86_64
gyp ERR! command "/usr/local/n/versions/node/6.2.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/services/fieldorder/node_modules/raw-socket
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 2.6.32-573.12.1.el6.x86_64
npm ERR! argv "/usr/local/n/versions/node/6.2.0/bin/node" "/usr/local/bin/npm" "install" "net-ping"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! raw-socket@1.5.0 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raw-socket@1.5.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! /root/services/fieldorder/npm-debug.log
But i am able to install on my mac which is using the same verison of node and npm.
The text was updated successfully, but these errors were encountered: