Skip to content
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

File "binding.gyp", line 1: SyntaxError: invalid syntax #24

Closed
Alexhb1986 opened this issue Apr 4, 2014 · 1 comment
Closed

File "binding.gyp", line 1: SyntaxError: invalid syntax #24

Alexhb1986 opened this issue Apr 4, 2014 · 1 comment

Comments

@Alexhb1986
Copy link

error installing the package on centos 6.5 node firebird 2.5.2 0.10.26

Help!!

npm install firebird
npm http GET https://registry.npmjs.org/firebird
npm http 304 https://registry.npmjs.org/firebird

[email protected] install /var/www/node/node_modules/firebird
node-gyp rebuild

Traceback (most recent call last):
File "/usr/bin/gyp", line 18, in
sys.exit(gyp.main(sys.argv[1:]))
File "/usr/lib/python2.6/site-packages/gyp/init.py", line 462, in main
options.circular_check)
File "/usr/lib/python2.6/site-packages/gyp/init.py", line 100, in Load
depth, generator_input_info, check, circular_check)
File "/usr/lib/python2.6/site-packages/gyp/input.py", line 2255, in Load
depth, check)
File "/usr/lib/python2.6/site-packages/gyp/input.py", line 362, in LoadTargetBuildFile
includes, True, check)
File "/usr/lib/python2.6/site-packages/gyp/input.py", line 217, in LoadOneBuildFile
None)
File "binding.gyp", line 1
{
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:428:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 2.6.32-431.11.2.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/node/node_modules/firebird
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

@xdenser
Copy link
Owner

xdenser commented Apr 6, 2014

Looks like it is Windows style new lines in binding.gyp.

xdenser added a commit that referenced this issue Apr 11, 2014
guymguym added a commit to guymguym/node-gyp that referenced this issue Nov 13, 2016
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
bnoordhuis pushed a commit to nodejs/node-gyp that referenced this issue Nov 16, 2016
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 <[email protected]>
refack pushed a commit to refack/node-gyp that referenced this issue Apr 23, 2017
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 <[email protected]>
refack pushed a commit to refack/node-gyp that referenced this issue Aug 19, 2017
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants