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

yarn fails to install fsevents while npm succeeds #5962

Closed
minusfive opened this issue Jun 9, 2018 · 39 comments
Closed

yarn fails to install fsevents while npm succeeds #5962

minusfive opened this issue Jun 9, 2018 · 39 comments
Assignees
Labels

Comments

@minusfive
Copy link

@minusfive minusfive commented Jun 9, 2018

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

yarn fails to install fsevents (404s), while npm succeeds

If the current behavior is a bug, please provide the steps to reproduce.

With yarn

❯ git clone git@github.com: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 " > eslint-plugin-node@6.0.1" 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 node-pre-gyp@0.6.39
node-pre-gyp info using node@10.4.0 | 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 fsevents@1.1.3 and node@10.4.0 (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 fsevents@1.1.3 and node@10.4.0 (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 node-gyp@3.6.2
gyp info using node@10.4.0 | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@10.4.0 | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@10.4.0 | darwin | x64
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@10.4.0 | 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 node-gyp@3.6.2
gyp info using node@10.4.0 | darwin | x64
gyp info using node-gyp@3.6.2
gyp info using node@10.4.0 | 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.

With npm

❯ rm -rf node_modules
❯ npm install

> fsevents@1.2.4 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

> node-sass@4.9.0 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

> spawn-sync@1.0.15 postinstall /Users/minusfive/dev/oss/ember-cli-sass-variables-export/node_modules/spawn-sync
> node postinstall


> node-sass@4.9.0 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
@ghost ghost assigned BYK Jun 9, 2018
@ghost ghost added the triaged label Jun 9, 2018
@minusfive minusfive changed the title `yarn` fails to install `fsevents` while `npm` succeeds yarn fails to install fsevents while npm succeeds Jun 9, 2018
@BYK

This comment has been minimized.

Copy link
Member

@BYK BYK commented Jun 10, 2018

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.

@BYK BYK closed this Jun 10, 2018
@justin808

This comment has been minimized.

Copy link

@justin808 justin808 commented Jun 13, 2018

I cleared both my yarn and node caches and I still get this error, yarn 1.6.0, node 10.1.0.

@jadchaar

This comment has been minimized.

Copy link

@jadchaar jadchaar commented Jun 14, 2018

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.

@sisterjones

This comment has been minimized.

Copy link

@sisterjones sisterjones commented Jun 18, 2018

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?

@esausilva

This comment has been minimized.

Copy link

@esausilva esausilva commented Jun 19, 2018

@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

@MaxGraey

This comment has been minimized.

Copy link

@MaxGraey MaxGraey commented Jun 24, 2018

Same issue on MacOS with node 10.5.0

@wilomgfx

This comment has been minimized.

Copy link

@wilomgfx wilomgfx commented Jul 11, 2018

same issue with node 10.6.0 (macOs mojave beta 2)

@xuqingkuang

This comment has been minimized.

Copy link

@xuqingkuang xuqingkuang commented Jul 18, 2018

Just downgrade the node to LTS 8.11.3 will works fine.

Every nodejs version lower than 10 should work.

@joshkg

This comment has been minimized.

Copy link

@joshkg joshkg commented Jul 19, 2018

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.

@regiondavid

This comment has been minimized.

Copy link

@regiondavid regiondavid commented Aug 31, 2018

use node 8.11 fixed

@esausilva

This comment has been minimized.

Copy link

@esausilva esausilva commented Aug 31, 2018

The latest Yarn version fixes this. I haven't had this issues since updating and now I'm running Node 10.x

@Macilias

This comment has been minimized.

Copy link

@Macilias Macilias commented Sep 3, 2018

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

@esausilva

This comment has been minimized.

Copy link

@esausilva esausilva commented Sep 4, 2018

@Macilias you can delete the lock file and yarn will re-create it when running yarn install

@Macilias

This comment has been minimized.

Copy link

@Macilias Macilias commented Sep 4, 2018

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.

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Sep 25, 2018

I've cleared the cache and that works perfectly. try yarn cache clean

@maximelafarie

This comment has been minimized.

Copy link

@maximelafarie maximelafarie commented Oct 26, 2018

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
...
@BYK

This comment has been minimized.

Copy link
Member

@BYK BYK commented Oct 26, 2018

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.

@underwindfall

This comment has been minimized.

Copy link

@underwindfall underwindfall commented Oct 30, 2018

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
@shrinathaithal

This comment has been minimized.

Copy link

@shrinathaithal shrinathaithal commented Nov 1, 2018

Mine worked with following -

rm yarn.lock
yarn cache clean
yarn install
@yuhr

This comment has been minimized.

Copy link

@yuhr yuhr commented Nov 3, 2018

Same error as @maximelafarie, with yarn global add some package comes with fsevents, but yarn cache clean succeeds.

  • yarn 1.12.1
  • node 11.0.0
  • macOS 10.14 Mojave

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 😭

@evannorstrand

This comment has been minimized.

Copy link

@evannorstrand evannorstrand commented Nov 3, 2018

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.

@ambroisemaupate

This comment has been minimized.

Copy link

@ambroisemaupate ambroisemaupate commented Nov 13, 2018

Same for me:

  • yarn 1.12.3
  • node v11.1.0
  • macOs 10.14.1

The above fixes did not work for me.

@leegee

This comment has been minimized.

Copy link

@leegee leegee commented Nov 30, 2018

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
@rld2drkw

This comment has been minimized.

Copy link

@rld2drkw rld2drkw commented Dec 2, 2018

In my case, it was helpful to downgrade python to 2.7 using pyenv.

node-gyp would require python 2.7, not 3.x.

infiniteluke added a commit to fourkitchens/scrummy-react-dom that referenced this issue Jan 3, 2019
Addresses #39. I had to `rm yarn.lock` and `yarn install` and  due to a upstream issue in yarnpkg/yarn#5962 (comment)
@tomsiwik

This comment has been minimized.

Copy link

@tomsiwik tomsiwik commented Mar 20, 2019

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
@kenjioi

This comment has been minimized.

Copy link

@kenjioi kenjioi commented Apr 25, 2019

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
@difosfor

This comment has been minimized.

Copy link

@difosfor difosfor commented May 3, 2019

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.

@conatus

This comment has been minimized.

Copy link

@conatus conatus commented May 7, 2019

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.

@mmontag

This comment has been minimized.

Copy link

@mmontag mmontag commented May 12, 2019

Another one fixed here by downgrading node from v12.2.0 to LTS v10.15.3.

@coreyward

This comment has been minimized.

Copy link

@coreyward coreyward commented May 13, 2019

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"
}
@rolandoalvarado

This comment has been minimized.

Copy link

@rolandoalvarado rolandoalvarado commented May 30, 2019

yarn upgrade solves my issue.

@byzyk

This comment has been minimized.

Copy link

@byzyk byzyk commented Jul 8, 2019

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.

@aindong

This comment has been minimized.

Copy link

@aindong aindong commented Jul 9, 2019

I recently experienced this issue and yarn upgrade did solve the problem. Thank you!

@coreyward

This comment has been minimized.

Copy link

@coreyward coreyward commented Jul 9, 2019

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

@egel

This comment has been minimized.

Copy link

@egel egel commented Aug 1, 2019

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:

  1. yarn list
  2. search backward for all occurrences of fsevents
  3. update those packages (best to latest versions). yarn upgrade <package>
  4. remove local node_modules rm -rf node_modules
  5. clean yarn cache yarn cache clean
  6. reinstall packages yarn
@coreyward

This comment has been minimized.

Copy link

@coreyward coreyward commented Aug 1, 2019

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

@qu4sar

This comment has been minimized.

Copy link

@qu4sar qu4sar commented Jan 9, 2020

try with brew reinstall python@2

@andreluisjunqueira

This comment has been minimized.

Copy link

@andreluisjunqueira andreluisjunqueira commented Jan 16, 2020

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 !

@chuxolatouz

This comment has been minimized.

Copy link

@chuxolatouz chuxolatouz commented Jan 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.