Description
I'm getting the following build error when installing node-snap7. Im operating on Centos 6 and trying to install as non-root user. Running on node 0.12.7, also tried with 0.10.40. Installing as root works. Is there any way to avoid installing this package as root?
node-gyp rebuild
Traceback (most recent call last):
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in
sys.exit(gyp.script_main())
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 533, in script_main
return main(sys.argv[1:])
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 526, in main
return gyp_main(args)
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 502, in gyp_main
params, options.check, options.circular_check)
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 129, in Load
params['parallel'], params['root_targets'])
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2736, in Load
variables, includes, depth, check, True)
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 386, in LoadTargetBuildFile
includes, True, check)
File "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 238, 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 (/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 2.6.32-504.30.3.el6.x86_64
gyp ERR! command "node" "/home/sysuser/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/my-project/node_modules/node-snap7
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Linux 2.6.32-504.30.3.el6.x86_64
npm ERR! argv "/home/sysuser/.nvm/versions/node/v0.12.7/bin/node" "/home/sysuser/.nvm/versions/node/v0.12.7/bin/npm" "install" "node-snap7"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! node-snap7@0.2.1 install:node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-snap7@0.2.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-snap7 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-snap7
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /data/my-project/npm-debug.log