Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install fsevents - node-pre-gyp install --fallback-to-build #133

Closed
viswesh opened this issue May 13, 2016 · 4 comments
Closed

Comments

@viswesh
Copy link

viswesh commented May 13, 2016

'npm install fsevents' generates the below log. Is this a known issue?

> fsevents@1.0.12 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! fsevents@1.0.12 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the fsevents@1.0.12 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.
@bnoordhuis
Copy link
Contributor

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

@viswesh
Copy link
Author

viswesh commented May 16, 2016

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!

@bnoordhuis
Copy link
Contributor

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 isaacs/node-touch@fabcc25.

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

@thewebsitetherapist
Copy link

env TOUCH=/usr/bin/touch npm install fsevents
looks like it fixed it for me thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants