Fsevents: Unable to install fsevents - node-pre-gyp install --fallback-to-build

Created on 13 May 2016  路  4Comments  路  Source: fsevents/fsevents

'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.

Most helpful comment

I looked into it and I think I know what happens:

  1. The generated Makefile contains touch commands (the UNIX system command, not the npm module.)
  2. When the touch module is also installed, it's put on the PATH before the location of the system's touch when you npm install fsevents.
  3. The script isn't executable, presumably because it's an old version that predates https://github.com/isaacs/node-touch/commit/fabcc25174b3a43452b0ab1450febc21d3f7371c.

Long story short, env TOUCH=/usr/bin/touch npm install fsevents should work around it.

All 4 comments

/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:

  1. The generated Makefile contains touch commands (the UNIX system command, not the npm module.)
  2. When the touch module is also installed, it's put on the PATH before the location of the system's touch when you npm install fsevents.
  3. The script isn't executable, presumably because it's an old version that predates https://github.com/isaacs/node-touch/commit/fabcc25174b3a43452b0ab1450febc21d3f7371c.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thinkingdyw picture thinkingdyw  路  5Comments

paropark picture paropark  路  9Comments

evandrocoan picture evandrocoan  路  4Comments

pddkhanh picture pddkhanh  路  6Comments

mtraynham picture mtraynham  路  9Comments