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
- build: Node: 12+ throws error during npm install - add npm install node-sass as recommended on this post https://github.com/fsevents/fsevents/issues/278#issuecomment-492941312 — committed to meumobi/mmb-demos.master-detail-ionic4 by deleted user 5 years ago
- Address https://github.com/fsevents/fsevents/issues/278 — committed to apache/drat by chrismattmann 5 years ago
- forced fsevents@1.2.9 as per https://github.com/fsevents/fsevents/issues/278#issuecomment-555104505 — committed to MusicAsCode/set-player by styk-tv 5 years ago
- Update jest due to transitive incompatibilites with more recent Node versions - specifically fsevents: https://github.com/fsevents/fsevents/issues/278 — committed to all-of-us/workbench by jmthibault79 4 years ago
- Upgrade to fsevents@^1.2.9 to work around MacOS installation issue: https://github.com/fsevents/fsevents/issues/278. — committed to mmaday/babel-plugin-recharts by mmaday 4 years ago
- Upgrade fsevents for macOS Catalina support https://github.com/fsevents/fsevents/issues/278 fsevents 1.2.9+ is required for proper macOS Catalina support. Without that, a yarn install fails. We had ... — committed to natematykiewicz/rubyapi by natematykiewicz 4 years ago
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 12Install fsevents@1.2.9 and it should work.
For those using yarn, I added the following to my
package.jsonand it worked perfectly: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 -git 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?
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 😦
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.9I’m facing this issue after I remove yarn.lock and reinstalling the problem seems to be solved.
Environment: macOS:
Mojave 10.14.6React:^16.11.0Node:12.9.1yarn.lock fsevents:
1.2.7Be aware that adding the
resolutionsworkaround 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
fseventsversion 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 withcreate-react-appi could solve it by using a newer version ofreact-scriptwhich is using a newer version offseventsand it worked for meLike @nassif7 said, the issue for me was
react-scriptswas out of date, using an old version of fsevents that I think was breaking on Node.js 13. Updating toreact-scripts@3.3.0resolved 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
-EHey 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@latestand it worked like a charm@paulmillr thanks, I get it because of
chokidarusefsevents v1.2.7in 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