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

Syntax error on binding.gyp #199

Closed
postypython opened this issue Feb 18, 2013 · 2 comments
Closed

Syntax error on binding.gyp #199

postypython opened this issue Feb 18, 2013 · 2 comments

Comments

@postypython
Copy link

First of all I wish to thank you for this useful module.
Unfortunately I am experiencing the issue in the object while launching node-gyp configure but I am not able to find where the syntax error lies.
Would you please be so kind to put me on the right path?
Many thanks in advance

gyp info it worked if it ends with ok
gyp info using node-gyp@0.8.4
gyp info using node@0.8.20 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/node/clogger/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/platypus/.node-gyp/0.8.20/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/platypus/.node-gyp/0.8.20',
gyp info spawn args   '-Dmodule_root_dir=/var/node/clogger',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "/usr/lib/node_modules/node-gyp/gyp/gyp", line 18, in <module>
    sys.exit(gyp.main(sys.argv[1:]))
  File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in main
    return gyp_main(args)
  File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 499, in gyp_main
    options.circular_check)
  File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 129, in Load
    params['parallel'])
  File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2556, in Load
    variables, includes, depth, check, True)
  File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 365, in LoadTargetBuildFile
    includes, True, check)
  File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 223, in LoadOneBuildFile
    None)
  File "binding.gyp", line 1
    {"targets":[{"target_name":"clogger","sources":[ "clogger.cc"]}]}
                                                                     ^
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:416:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 2.6.32-33-server
gyp ERR! command "node" "/usr/bin/node-gyp" "configure"
gyp ERR! cwd /var/node/clogger
gyp ERR! node -v v0.8.20
gyp ERR! node-gyp -v v0.8.4
gyp ERR! not ok
@bomsy
Copy link

bomsy commented Mar 6, 2013

can you paste the contents of your binding.gyp file?

@TooTallNate
Copy link
Contributor

You have a syntax error somewhere in your binding.gyp file. Make sure it's valid gyp (i.e. python) syntax.

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 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 <info@bnoordhuis.nl>
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 <info@bnoordhuis.nl>
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 <info@bnoordhuis.nl>
toyobayashi pushed a commit to toyobayashi/node-gyp that referenced this issue Mar 20, 2024
* chore: Use 3.11 for integration tests

* chore: Add lint ignore rule

* Python 3.7 is EOL next week so Python 3.8 and current Python

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
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

3 participants