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

Error when running install inside testdouble.js #298

Closed
jasonkarns opened this issue Nov 11, 2017 · 3 comments
Closed

Error when running install inside testdouble.js #298

jasonkarns opened this issue Nov 11, 2017 · 3 comments

Comments

@jasonkarns
Copy link
Member

jasonkarns commented Nov 11, 2017

A fresh yarn install within testdouble package flows up with a node-gyp error:

$ yarn

yarn install v1.3.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
error /Users/jasonkarns/Projects/td/testdouble.js/node_modules/deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments: 
Directory: /Users/jasonkarns/Projects/td/testdouble.js/node_modules/deasync
Output:
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-gyp ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:655:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
warning Error running install script for optional dependency: "/Users/jasonkarns/Projects/td/testdouble.js/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: node install\nArguments: \nDirectory: /Users/jasonkarns/Projects/td/testdouble.js/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using node-pre-gyp@0.6.33\nnode-pre-gyp info using node@8.8.1 | darwin | x64\nnode-pre-gyp info check checked for "/Users/jasonkarns/Projects/td/testdouble.js/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.1 and node@8.8.1 (node-v57 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)\nnode-pre-gyp ERR! stack at ChildProcess. (/Users/jasonkarns/Projects/td/testdouble.js/node_modules/node-pre-gyp/lib/util/compile.js:77:29)\nnode-pre-gyp ERR! stack at emitOne (events.js:115:13)\nnode-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:7)\nnode-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)\nnode-pre-gyp ERR! stack at onErrorNT (internal/child_process.js:374:16)\nnode-pre-gyp ERR! stack at _combinedTickCallback (internal/process/next_tick.js:138:11)\nnode-pre-gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:180:9)\nnode-pre-gyp ERR! System Darwin 16.7.0\nnode-pre-gyp ERR! command "/usr/local/Cellar/node/8.8.1/bin/node" "/Users/jasonkarns/Projects/td/testdouble.js/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"\nnode-pre-gyp ERR! cwd /Users/jasonkarns/Projects/td/testdouble.js/node_modules/fsevents\nnode-pre-gyp ERR! node -v v8.8.1\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.33\nnode-pre-gyp ERR! not ok \nFailed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)"
info This module is OPTIONAL, you can safely ignore this error

yarn: 1.3.2
node: 8.8.1

@jasonkarns jasonkarns changed the title deasync Error when running install inside testdouble.js Nov 11, 2017
@searls
Copy link
Member

searls commented Nov 16, 2017

any insight into what's going on?

@jasonkarns
Copy link
Member Author

not yet, wanted to throw this out there in case anyone else encounters. planning on digging some tomorrow.

@jasonkarns
Copy link
Member Author

jasonkarns commented Nov 17, 2017

I'm assuming it's an issue with node-gyp.

It works fine on all versions of node that have an npm higher than 5.3. It failed on my brew-installed node 8.9.1, but succeeded on nodenv's 8.9.1. The only difference between them is how homebrew manages its version of npm separately. And since npm manages its version of node-gyp separately, I'm just assuming they're related.

So if anyone else has this issue, recommended workaround: don't use homebrew's node. Use a nodenv-installed node (+ a recentish version of npm so that you have recentish node-gyp).

Or if you really like homebrew's node/npm/node-gyp, maybe do the force upgrade documented here: https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp (I did not try this because: 💚

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

2 participants