node.jsnode-gypcentos6.5

node-gyp rebuild - Error: `gyp` failed with exit code: 1


I'm getting an error while doing node-gyp rebuild on CentOS 6.8:

File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 295, in LoadBuildFileIncludesIntoDict
    LoadOneBuildFile(include, data, aux_data, None, False, check),
  File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 238, in LoadOneBuildFile
    None)
  File "/usr/local/app/jenkins/.node-gyp/iojs-1.4.0/common.gypi", 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/local/lib/node_modules/node-gyp/lib/configure.js:355: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-642.1.1.el6.x86_64
    gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild" "--target=1.4.0" "--arch=x64" "--target_platform=linux" "--dist-url=https://atom.io/download/atom-shell" "--module_name=node_sqlite3" "--module_path=../lib/binding/electron-v1.4-linux-x64"
    gyp ERR! cwd /usr/local/app/jenkins/workspace/offline/desktop/deploy/node_modules/sqlite3
    gyp ERR! node -v v4.0.0
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok

Try with updating node-gyp, globally installing node-gyp.


Solution

  • updated python version to Python 2.7.6

    issue fixed.