fsevents: Node: 12.2.0 throws error during npm install

Use Node: 12.2.0 Command: npm install

Sorry for long error logs

The following issue occurs,

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 38
  • Comments: 34 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Deleting package-lock.json and npm i worked for me.

Anyone hitting issues with 1.2.9, remember to make sure you’ve updated node-sass (npm install node-sass) to latest version that has full support for Node 12

Install fsevents@1.2.9 and it should work.

For those using yarn, I added the following to my package.json and it worked perfectly:

  "resolutions": {
    "fsevents": "1.2.9",
    "**/fsevents": "1.2.9"
  }

Check your package-lock.json, it may contain dependency that requires fsevents at a low level like 1.1.0, which bothered me the whole day. Just delete the package-lock.json and install fsevents@1.2.9 and npm install. No error comes!

solve using this code:

npm install npm@latest -g

Install fsevents@1.2.9 and it should work.

it works for node 10.15.3

@paulmillr I tried to install the latest version of fsevents, but it also didn’t solve the problem. What should I do?

  1. rm -rf node_modules
  2. npm i -D fsevents
  3. npm i

Is it correct list of commands?

UPD I’ve double checked package-lock.json file, and I see that there are a lot of dependencies that use different versions of fsevents. What should I do?

1.2.9 seems to be still broken on node 12.1.0 😦

For those using yarn, I added the following to my package.json and it worked perfectly:

  "resolutions": {
    "fsevents": "1.2.9",
    "**/fsevents": "1.2.9"
  }

I use yarn instead of npm. You really saved my time! Very Thx 👍

Had this with Angular-CLI… Removing package-lock.json fixed it.

The error goes away if you use yarn add fsevents@1.2.9

I’m facing this issue after I remove yarn.lock and reinstalling the problem seems to be solved.

Environment: macOS: Mojave 10.14.6 React: ^16.11.0 Node: 12.9.1

yarn.lock fsevents: 1.2.7

Be aware that adding the resolutions workaround to your package.json will fix things on your Mac, but break things in your Linux builds.

https://github.com/yarnpkg/yarn/issues/7590

Seems like best thing is to chase up your dependencies and create PRs for those using older versions of fsevents.

I’ve tried all of the mentioned actions. It doesn’t work. I have the same issue. Loooooooong log of errors.

the fsevents version you are trying to use is too old, check the dependencies that using it and make sure they are up to date, i had the same issue with create-react-app i could solve it by using a newer version of react-script which is using a newer version of fsevents and it worked for me

Like @nassif7 said, the issue for me was react-scripts was out of date, using an old version of fsevents that I think was breaking on Node.js 13. Updating to react-scripts@3.3.0 resolved this for me.

More generally speaking, if you’re not using react-scripts then find which package(s) you have that depend on fsevents and try updating them.

As i’ve said: what is your fsevents version from package-lock.json? version 1 is unsupported. You need to always use v2. If you have v1 somewhere that’ll cause the issue.

@pipobscure You are right, my bad, I should have used -E

Hey folks, we must ask maintainers of software which uses fsevents to upgrade to fsevents 2, which doesn’t have these problems. Please comment in issues mentioned in #325.

No brainer but, in addition to the above versioning solutions (which work mostly), my team updated the yarn.lock file and I started getting this fsevents build error. I tried all combinations of versions but the problem was the yarn was caching some versioning details and was not letting it go even when reinstalled. I had to restart my system and it started working. Just putting this out there since all the caching and threading done by Yarn for faster installations, over long periods introduces package resolution problems. The good old restart your machine worked for me.

I found out that I was using outdated version of react-scripts I installed the latest one using npm i react-scripts@latest and it worked like a charm

@paulmillr thanks, I get it because of chokidar use fsevents v1.2.7 in yarn.lock.

P.S. I’ve generated a project from npx create-react-app.

Looking at that log, it’s clearly 1.2.4 and NOT 1.2.9

I assume there is something in a lockfile that prevents getting 1.2.9