deasync
deasync copied to clipboard
Error: spawn node-gyp ENOENT
I'm getting this error and I am not sure how to fix it.
node --version
v9.7.1
yarn --version
1.3.2
python --version
Python 2.7.10
$ yarn
yarn install v1.3.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
[1/3] ⡀ deasync
[2/3] ⡀ fsevents
[-/3] ⡀ waiting...
[-/3] ⡀ waiting...
error /Users/sean/workspace/project.deploy/modules/auth/node_modules/deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments:
Directory: /Users/sean/workspace/project.deploy/modules/auth/node_modules/deasync
Output:
events.js:112
throw er; // Unhandled 'error' event
^
Error: spawn node-gyp ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:379:16)
at process._tickCallback (internal/process/next_tick.js:114:19)
warning Error running install script for optional dependency: "/Users/sean/workspace/project.deploy/modules/auth/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: node install\nArguments: \nDirectory: /Users/sean/workspace/project.deploy/modules/auth/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using [email protected]\nnode-pre-gyp info using [email protected] | darwin | x64\nnode-pre-gyp info check checked for \"/Users/sean/workspace/project.deploy/modules/auth/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz\nnode-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v59-darwin-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 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.2/fse-v1.1.2-node-v59-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.<anonymous> (/Users/sean/workspace/project.deploy/modules/auth/node_modules/node-pre-gyp/lib/util/compile.js:77:29)\nnode-pre-gyp ERR! stack at ChildProcess.emit (events.js:127:13)\nnode-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)\nnode-pre-gyp ERR! stack at onErrorNT (internal/child_process.js:379:16)\nnode-pre-gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:114:19)\nnode-pre-gyp ERR! System Darwin 17.4.0\nnode-pre-gyp ERR! command \"/usr/local/Cellar/node/9.7.1_1/bin/node\" \"/Users/sean/workspace/project.deploy/modules/auth/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"\nnode-pre-gyp ERR! cwd /Users/sean/workspace/project.deploy/modules/auth/node_modules/fsevents\nnode-pre-gyp ERR! node -v v9.7.1\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.38\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
Try this on your packages.json
"postinstall": "cd node_modules/deasync && node-gyp rebuild && cd ../../", "postupgrade": "yarn postinstall",
See this for a solution and workaround:
- https://github.com/abbr/deasync/issues/181