« Back

Builds failing because of node-gyp missing common.gypi

15 April 2016 by

This issue became apparent on one of CI build boxes.

For whatever reason the common.gypi file has gone missing.

Stack trace:

gyp: /home/builder/.node-gyp/5.9.1/common.gypi not found (cwd: /home/builder/buildtmp/X-JOB1/app/node_modules/fsevents) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.10.0-229.7.2.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/builder/buildtmp/X-JOB1/app/node_modules/fsevents/lib/binding/Release/node-v47-linux-x64/fse.node" "--module_name=fse" "--module_path=/home/builder/buildtmp/X-JOB1/app/node_modules/fsevents/lib/binding/Release/node-v47-linux-x64"

Solution:

rm -rf /home/builder/.node-gyp

(or whatever your ~/.node-gyp location is).

After this node-gyp should simply rebuild its folder with everything in it.


Tags: node, node-gyp, common.gypi, npm, js