Do you want to request a feature or report a bug?
Bug
What is the current behavior?
yarn
fails to installfsevents
(404s), whilenpm
succeeds
If the current behavior is a bug, please provide the steps to reproduce.
yarn
❯ git clone [email protected]:minusfive/ember-cli-sass-variables-export.git
❯ cd ember-cli-sass-variables-export
❯ yarn
yarn install v1.7.0
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
[3/5] 🚚 Fetching packages...
[-------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1048(node:5246) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[4/5] 🔗 Linking dependencies...
warning " > [email protected]" has unmet peer dependency "eslint@>=3.1.0".
[5/5] 📃 Building fresh packages...
[-/3] ⠁ waiting...
[2/3] ⠂ fsevents
warning Error running install script for optional dependency: "/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for \"/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http Connection closed while downloading tarball file
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp http GET https://nodejs.org/download/release/v10.4.0/node-v10.4.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v10.4.0/node-v10.4.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v10.4.0/node-v10.4.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v10.4.0/node-v10.4.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v10.4.0/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v10.4.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v10.4.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v10.4.0/SHASUMS256.txt
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/minusfive/.node-gyp/10.4.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/minusfive/.node-gyp/10.4.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/minusfive/.node-gyp/10.4.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/minusfive/.node-gyp/10.4.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/minusfive/.node-gyp/10.4.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/minusfive/.node-gyp/10.4.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
gyp info ok
gyp info it worked if it ends with ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:839:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:854:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:869:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:839:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:854:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:869:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1648:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1648:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/minusfive/.node-gyp/10.4.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:85:
../src/methods.cc:14:12: warning: 'Call' is deprecated [-Wdeprecated-declarations]
handler->Call(3, argv);
^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
In file included from ../fsevents.cc:85:
../src/methods.cc:14:12: warning: 'Call' is deprecated [-Wdeprecated-declarations]
handler->Call(3, argv);
^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
5 warnings generated.
5 warnings generated.
SOLINK_MODULE(target) Release/fse.node
rm: cannot remove './Release/.deps/Release/obj.target/fse/fsevents.o.d.raw': No such file or directory
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! command \"/usr/local/Cellar/node/10.4.0/bin/node\" \"/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64\"
gyp ERR! cwd /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.4.0/bin/node /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 17.6.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/10.4.0/bin/node\" \"/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents
node-pre-gyp ERR! node -v v10.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.4.0/bin/node /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
COPY /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp
✨ Done in 157.31s.
npm
❯ rm -rf node_modules
❯ npm install
> [email protected] install /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents
> node install
[fsevents] Success: "/Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
> [email protected] install /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-sass
> node scripts/install.js
Cached binary found at /Users/minusfive/.npm/node-sass/4.9.0/darwin-x64-64_binding.node
> [email protected] postinstall /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/spawn-sync
> node postinstall
> [email protected] postinstall /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
added 1317 packages from 645 contributors and audited 40932 packages in 32.386s
What is the expected behavior?
It should work?
Please mention your node.js, yarn and operating system version.
❯ node -v
v10.4.0
❯ npm -v
6.1.0
❯ yarn -v
1.7.0
❯ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.5
BuildVersion: 17F77
This is not yarn. It is AWS giving you a 404 from one of the install scripts running through fsevents. Looks like it goes through with npm because it was cached. If you try again with Yarn it may go through if this was a temporary server issue.
If not, then if you clear your npm cache and try again, that will also fail.
I cleared both my yarn and node caches and I still get this error, yarn 1.6.0, node 10.1.0.
I am getting this issue as well on Node 10.4.1
.
Update: it turns out the version of Webpack we are using depends on an older version of fsevents
that is not compatible with Node ^10
.
Try running yarn upgrade
.
I'm also having this issue, but only in directories that I set up with yarn create react-app [dir name]
a few months ago.
If I create a new directory, i.e. for a different project, then I have no issues.
I'm using node 10.4.1
npm 6.1.0
yarn 1.7.0
I've tried running yarn upgrade
but it triggers the same error w/ fsevents.
Anyone have any other ideas?
@sisterjones I'm having the same issue in my Mac with CRA and is driving me crazy (Node 10.4.1). It works in Windows though, but I have Node 9.11.1 in Windows
Edit: I downgraded to Node 9.11.12 and everything works fine now. Hopefully a fix to this is released soon
Same issue on MacOS with node 10.5.0
same issue with node 10.6.0 (macOs mojave beta 2)
Just downgrade the node to LTS 8.11.3 will works fine.
Every nodejs version lower than 10 should work.
I experienced this issue when upgrading my Ember project to version 3.2, which requires node 10+. The only thing that helped was yarn upgrade
.
use node 8.11 fixed
The latest Yarn version fixes this. I haven't had this issues since updating and now I'm running Node 10.x
I can not run yarn upgrade because it says:
error Outdated lockfile. Please run
yarn install
and try again.
when run yarn install it says:
error /Users/username/Programming/github.com/projectname/node_modules/node-zopfli: Command failed.
Exit code: 1
Seams like an mission impossible to me
@Macilias you can delete the lock file and yarn will re-create it when running yarn install
while true, yarn fails to recreate it once the file has been deleted, so the project stays in an unusable state ... We could not figure out how to update it to get into a usable state.
I've cleared the cache and that works perfectly. try yarn cache clean
The same with yarn cache clean
on Mojave OS. 😕
Output:
...
gyp ERR! cwd /Users/username/.../app/node_modules/fsevents
gyp ERR! node -v v10.12.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
...
Try running yarn global add node-gyp
first and then try installing fsevents. Btw. which version of yarn are you using? In recent versions this shouldn't be necessary.
I have the same issue, just like @maximelafarie
try running yarn global add node-gyp
did not save me. @BYK
yarn version :1.2.1
node version :v10.13.0
npm version :6.4.1
macOS version : Mojave
EDIT
For those who have the same issue like me, I have to downgrade node version to skip reinstalling fsevents
. So I gonna paste the final environment of my workspace
yarn version :1.2.3
node version :8.12.0
Mine worked with following -
rm yarn.lock
yarn cache clean
yarn install
Same error as @maximelafarie, with yarn global add
some package comes with fsevents
, but yarn cache clean
succeeds.
Edit
The issue seems to be resolved by running yarn global add node-gyp
and then yarn global remove node-gyp
... I'm not sure what happened, anyway everything's working without error for me 😭
This issue is happening for me as well.
yarn 1.12.1
node 11.0.0
macOS 1.14 Mojave.
The above fixes did not work for me.
Same for me:
The above fixes did not work for me.
Me too.... why is this issue closed?
09:13:23 $ node -v
v11.2.0
09:18:10 $ yarn -v
1.12.3
09:18:12 $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.6
BuildVersion: 17G65
In my case, it was helpful to downgrade python to 2.7 using pyenv.
node-gyp would require python 2.7, not 3.x.
On Mac OS X with versions:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.6
BuildVersion: 17G3025
$ node -v
v11.12.0
$ yarn -v
1.15.2
The following helped (and yes npm succeeded before):
# xcode was erroring with brew
sudo xcode-select --switch /Applications/Xcode.app
sudo xcodebuild -license accept
# fresh new node modules
rm -rf node_modules
# solution @shrinathaithal (these commands alone did not help though)
rm yarn.lock
yarn cache clean
yarn install
I had solved exactly same error, by changing the version of node from latest to lts.
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.4
BuildVersion: 18E227
$ npm -v
6.4.1
$ yarn -v
1.15.2
$ node -v
v12.0.0
$ sudo n lts
$ node -v
v10.15.3
$ create-react-app my-app
Had a similar issue with Node v12.1.0 on my Mac just now. Fixed it by using $ yarn upgrade
. I think the key was updating from fsevents v1.2.8 to v1.2.9.
I had the same issue as this running the following:
> sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.4
BuildVersion: 18E226
> node -v
v12.1.0
Running yarn cache clean
followed by using the LTS version of Node.js at v10.15.3 as opposed to the current version fixed it.
I'm nvm
to juggle multiple Node.js versions.
Another one fixed here by downgrading node from v12.2.0 to LTS v10.15.3.
There was recently an issue with fsevents causing it to be incompatible with Node 12. This was resolved and released in fsevents v1.2.9. If you have dependencies that rely on fsevents you can tell Yarn to use version 1.2.9 for each of them using resolutions:
Add this to your package.json
file, then re-run yarn
(or yarn install
):
"resolutions": {
"fsevents": "1.2.9"
}
yarn upgrade solves my issue.
Please note that Yarn is going to treat packages listed in resolutions
(as suggested by @coreyward) as non-optional because of #6834 bug. Because of the bug, your build might succeed on macOS but will fail on Linux.
I recently experienced this issue and yarn upgrade
did solve the problem. Thank you!
@aindong Did you see the comment above yours?
Please note that Yarn is going to treat packages listed in
resolutions
(as suggested by @coreyward) as non-optional because of #6834 bug. Because of the bug, your build might succeed on macOS but will fail on Linux.
You can do yarn upgrade
on your mac, which will install fsevents
, but then when you go to deploy to a Linux server where fsevents
is not available (it's macOS-specific) it will fail.
If you still have a problem with fsevents
you probably need to upgrade the packages which you're using. They may have old dependencies which in the end uses an old version of fsevents
. In my case, it was nodemod
-> yarn upgrade nodemon
How to find them:
yarn list
fsevents
yarn upgrade <package>
rm -rf node_modules
yarn cache clean
yarn
@egel This is overkill. Most of the dependencies that reference fsevents
as a dependency are going to have it declared like ~> 0.2.7
or >= 0.2.7
, which allow you install version 0.2.9
while still meeting the requirements. Thus the solution of using resolutions, which allow you to have Yarn _resolve_ a dependency declaration (e.g. fsevents ~> 0.2.7
or fsevents
) to a specific version.
As a note, this works great for most dependencies, but because fsevents
is platform specific and previous versions of Yarn didn't allow resolutions to be optional, when Yarn would be run in an environment that doesn't use fsevents
(like Linux), dependency installation would fail. I believe this has been fixed in the latest version of Yarn, but if not a workaround is to add the resolutions, re-run yarn install
, and then commit _only_ your yarn.lock
file and discard the resolution declaration in your package.json
file. This results in the correct version of fsevents
being utilized going forward, but since resolutions are not used the optional flag is not clobbered.
In any case, running commands like rm -rf node_modules
and yarn cache clean
are ineffective when you do not have an issue with corrupted packages. Rebuilding the entire cache over the network is slow, too, doing this unnecessarily is not recommended.
i solved node-pre-gyp ERR! not ok
by changing node version to 10.2.1, yarn 1.21.1, and now is working fine !
I don't know if someone still have this issue. I solved it doing
yarn install --check-files
I had to do it a couple of times
I did it on OSX 10.13 High Sierra
Works for me:
yarn upgrade
revert changes in package.json (if needed for your situation)
rm -rf node_modules
rm yarn.lock
yarn
commit newly created lock file
It worked for me xcode-select --install
In my case and since I have Babel I was not able to use:
"resolutions": {
"**/**/fsevents": "^1.2.9"
}
due to multiple nested dependencies using different version of it.
But I succeeded using:
"resolutions": {
"**/**/chokidar": "^2.1.8"
}
Roughly, Babel team wants to keep compatibility with Node 6 that's why it still use the old fsevents
, but they plan to migrate in Babel v8.
Hope it helps 🥰
I solved this by deleting package-lock.json
and re-running npm install
.
I don't know if someone still have this issue. I solved it doing
yarn install --check-files
I had to do it a couple of timesI did it on OSX 10.13 High Sierra
This solved for me! I had to run it few times as well.
Thanks
Most helpful comment
I am getting this issue as well on
Node 10.4.1
.Update: it turns out the version of Webpack we are using depends on an older version of
fsevents
that is not compatible withNode ^10
.Try running
yarn upgrade
.