'npm install fsevents' generates the below log. Is this a known issue?
> [email protected] install /vis/ss/ss_6/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
/vis/ss/ss_6/node_modules/.bin/touch: line 1: syntax error near unexpected token `('
/vis/ss/ss_6/node_modules/.bin/touch: line 1: `var touch = require("../touch")'
make: *** [Release/obj.target/fse/fsevents.o] Error 2
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/vis/ss/ss_6/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" "--module_name=fse" "--module_path=/vis/ss/ss_6/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64"
gyp ERR! cwd /vis/ss/ss_6/node_modules/fsevents
gyp ERR! node -v v6.0.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/vis/ss/ss_6/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node --module_name=fse --module_path=/vis/ss/ss_6/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/vis/ss/ss_6/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Darwin 15.4.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/vis/ss/ss_6/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /vis/ss/ss_6/node_modules/fsevents
node-pre-gyp ERR! node -v v6.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.25
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/vis/ss/ss_6/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node --module_name=fse --module_path=/vis/ss/ss_6/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64' (1)
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "fsevents"
npm ERR! node v6.0.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the fsevents package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs fsevents
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fsevents
npm ERR! There is likely additional logging output above.
/vis/ss/ss_6/node_modules/.bin/touch: line 1: syntax error near unexpected token
(' /vis/ss/ss_6/node_modules/.bin/touch: line 1:var touch = require("../touch")'
I think that's a problem local to your system. fsevents doesn't use touch and neither do its dependencies. Try removing the node_modules directory and reinstalling.
I downgraded my setup to node 4.4.4 & npm 2.15.1 and the issue disappeared. Removing node_modules and reinstalling with node 6 didn't work though. I'm content with node 4.4.4. Thanks!
I looked into it and I think I know what happens:
touch commands (the UNIX system command, not the npm module.)touch when you npm install fsevents.Long story short, env TOUCH=/usr/bin/touch npm install fsevents should work around it.
env TOUCH=/usr/bin/touch npm install fsevents
looks like it fixed it for me thank you
Most helpful comment
I looked into it and I think I know what happens:
touchcommands (the UNIX system command, not the npm module.)touchwhen younpm install fsevents.Long story short,
env TOUCH=/usr/bin/touch npm install fseventsshould work around it.