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
v3.0.0 with Node v12/NPM 6.9.0 gives "TypeError: fsevents is not a constructor" #6891
Comments
I had the same issue. How did you solve it? |
Same issue... node: v12.0.0 |
Updated 22:30
Other things I did:
|
For now you can downgrade Node, or remove |
It looks like Node.js v12 removed You can reproduce:
Output:
|
Fix in fsevents/fsevents#271, waiting on nodejs/nan#849 |
Giving up and then yarn install and yarn run...and its working! |
FYI: For me, removing |
I solved installing yarn and then sudo forever npm and node_modules. Try this https://timonweb.com/posts/install-npm-packages-without-sudo/ for permission issues. After that I created a new project and finally i go the dev server on |
Worked for me, thanks mate! |
This worked for me so well that I would recommend to any one in my situation, this morning.
|
"resolutions": {
"fsevents": "
} Resolved the issue temporarily by adding this to my Until chokidar releases their next version, the api is fully compatible with latest version so it should work just fine 👍 |
@Shahor - Did as suggested but still not working :/ |
all my problems i've got is from fsevents |
Solve the issue |
Downgrading node version solves the issue. Please note that I have uninstalled all versions of the Node on my machine (and yarn as well), and then, instead of installing Node manually, installed nvm. This allows you to switch between different versions of Node easily. Once nvm is installed run To change Node version run Check you're set up correctly by running |
This solution from @amitpatil321 worked for me. 👍 |
very good way, thanks @majda |
Same issue using node v11.10.0 and npm v6.9.0, my issue was solved as well by deleting the |
@dominictobias What version of node works for you? I have tried several and yet no luck |
The LTS version works (10.6.0), I have 10.5.3 |
I was recently able to resolve this issue by going into the Node_module folder and finding fsevents folder. I changed the name of the folder to fsevent_old. I was then able to run React without an issue. |
I was able to resolve the issue with |
So We should use From OP's stack trace we can't see which package uses Go to the earliest line we have in the stack trace, and place a When using pnpm in a monorepo...In a pnpm monorepo we can search for usages like so:
Using pnpm and
Then trigger a reinstall like so:
This fixed it for me. |
This did it for me. Thanks!!! |
Yes, Its work but unfortunately we did not found the actual error to resolve that permanently. |
It may seem weird, but I was able to get it working after running: |
I also had the same issue though am using MacOS the issue is kind of bug. I solved this issue by repeatedly running the commands,
One time it did not worked but when I repeatedly cleaned the cache and after uninstalling npm, reinstalled npm, the error went off. Am using Angular 8 and this issue is common |
Thank you this worked for me! |
Hello Ronan,
if you are using 'npx' to create react app then you didn't need to add
sudo command at the beginning.
If you are using 'npm' then you need (if system want super user permission)
to add at the beginning.
I hope you got it.
Regards,
MANISH VERMA.
…On Sat, 3 Aug 2019, 8:33 pm Ronan Mockett, ***@***.***> wrote:
I had the same problem because I created new project using *sudo* what
caused permission conflict.
$ sudo npx create-react-app my-app // Did not work
$ npx create-react-app my-app
$ cd my-app && npm start // Work like a charm`
I hope this help someone to resolve this issue.
Thank you this worked for me!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6891?email_source=notifications&email_token=AHTB43X5YKCKLDFEGOH4JFLQCWM3LA5CNFSM4HIIC3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PP7UQ#issuecomment-517930962>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHTB43SWARCISEUSMDECNYTQCWM3LANCNFSM4HIIC3JA>
.
|
You need to install the yarn before creating your app sudo npm i -g yarn It have worked for me. ;) |
Yes yarn is a good method to create react app.
…On Mon, 5 Aug 2019, 9:48 pm marcosaimola, ***@***.***> wrote:
You need to install the yarn before creating your app
sudo npm i -g yarn
npx create-react-app my-app
cd my-app
npm start
It have worked for me. ;)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6891?email_source=notifications&email_token=AHTB43QHO734B3PK2CX6MZTQDBHFNA5CNFSM4HIIC3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3SKGFI#issuecomment-518300437>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHTB43UFS7AFGJCXXVUCBH3QDBHFNANCNFSM4HIIC3JA>
.
|
sudo n 10.16.0 my fix above |
If you want to use 'npx' then you must have npm 5.2+ version in your
system.
…On Tue, 6 Aug 2019, 8:59 am Luke Markham, ***@***.***> wrote:
sudo n 10.16.0
npx create-react-app my-app
cd my-app
npm install
npm start
my fix above
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6891?email_source=notifications&email_token=AHTB43S2B2QFODJJADGGRMTQDDVZLA5CNFSM4HIIC3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3TWXMA#issuecomment-518482864>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHTB43TMDTNDA3RMBL7AQJLQDDVZLANCNFSM4HIIC3JA>
.
|
use npx create-react-app my-app --use-npm |
This worked for me: npm audit fix --force |
I had this problem on macOS 10.13 too while using yarn, on a brand new create-react-app. I do not have a node version set in my
this happened to me while using NVM (node version manager) and had these versions of node & npm active respectively
deleting my yarn.lock file & deleting the interestingly, I was able to get a diff on the regenerated yarn lock file compared to the old one. as seen by git diff ( note minus and plus symbols )
|
First update your nodejs in your system. And then if they're any issue then
please demonstrate that to us.
…On Sat, 10 Aug 2019, 11:44 pm Jason Fleetwood-Boldt, < ***@***.***> wrote:
I had this problem on macOS 10.13 too while using yarn, on a brand new
create-react-app. I do not have a node version set in my package.json
file:
{
"name": "star-ratings-basic",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-scripts": "3.1.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
this happened to me while using NVM (node version manager) and had these
versions of node & npm active respectively
$ npm -v
node 6.10.2
$ node -v
v12.8.0
deleting my yarn.lock file & deleting the node_modules folder and then
running yarn worked immediately.
interestingly, I was able to get a diff on the regenerated yarn lock file
compared to the old one. as seen by git diff ( note minus and plus symbols )
***@***.******@***.***", ***@***.***/code-frame@^7.5.5":
***@***.******@***.***", ***@***.***/code-frame@^7.0.0", ***@***.***/code-frame@^7.5.5":
version "7.5.5"
resolved ***@***.***/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d"
integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==
dependencies:
***@***.***/highlight" "^7.0.0"
***@***.***/code-frame@^7.0.0":
- version "7.0.0"
- resolved ***@***.***/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
- integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==
- dependencies:
- ***@***.***/highlight" "^7.0.0"
-
***@***.******@***.***", ***@***.***/core@^7.1.0", ***@***.***/core@^7.4.5":
version "7.5.5"
resolved ***@***.***/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30"
@@ -36,17 +29,6 @@
semver "^5.4.1"
source-map "^0.5.0"
***@***.***/generator@^7.1.3":
- version "7.1.3"
- resolved ***@***.***/generator/-/generator-7.1.3.tgz#2103ec9c42d9bdad9190a6ad5ff2d456fd7b8673"
- integrity sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==
- dependencies:
- ***@***.***/types" "^7.1.3"
- jsesc "^2.5.1"
:
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6891?email_source=notifications&email_token=AHTB43T2IWUIS5AWJFDFYCLQD4AQFA5CNFSM4HIIC3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ASOBA#issuecomment-520169220>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHTB43QG2QDKFLW4FD56OZ3QD4AQFANCNFSM4HIIC3JA>
.
|
seems like I can reproduce it…
(normal create-react-app output truncated)
the server starts, it clears the console and then the app crashes with this. at the same time Chrome opens to 127.0.0.1:3000 but to a "This site can’t be reached" page as the server is crashed
I'm using nvm, and I have node 12.8.0 activated. should I do something else to update npm or node in my system? I'm not sure I understand if there's any steps I'm missing when you say "First update your nodejs in your system". am I not using the latest versions? |
it appears to do this for me on every create-react-app I make |
I also faced that situation in my system, so I researched alot about it
then I got that, first Clean your yarn then I Cleaned my apt using 'sudo
apt clean' then 'sudo apt update' for repair and updating packages then
'sudo apt upgrade' for require upgrades to my packages.
Then create a new react app.
It might be work in your system.
…On Sun, 11 Aug 2019, 8:35 am Jason Fleetwood-Boldt, < ***@***.***> wrote:
it appears to do this for me on *every* create-react-app I make
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6891?email_source=notifications&email_token=AHTB43WWDNHDWMYC4MMCFRDQD56Y3A5CNFSM4HIIC3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4AZBQY#issuecomment-520196291>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHTB43TKXK22WHSENSGKD4LQD56Y3ANCNFSM4HIIC3JA>
.
|
This worked for me too :) Cheers! |
hmm sudo apt update does not work for me
|
incidentally I am on mac OS 10.13.6 using Xcode 9.4.1 with gcc clang version clang-902.0.39.2 I wonder if there's a way to blow away my yarn binary to clear the problem? |
some people on the reactiflux Discord channel are recommending downgrading to Node 11 until the issue is mitigated. |
thanks mate. this worked for me |
This indeed works. I struggle making my first react app to work at first, but eventually installing yarn (and use it after that) make it work, it really do the trick ✨ |
I no longer get this issue, tested with Node 12.7 and 12.9 using either NPM or Yarn. Thinking of closing this soon as it seems to have been resolved. |
This worked for me. I had Node version: 12.8.0 on a mac |
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes, tried clean install use Node v12 and NPM 6.9.0
Which terms did you search for in User Guide?
Anything about fsevents errors.
Environment
System:
OS: macOS 10.14.4
CPU: x64 Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
Binaries:
Node: 12.0.0 - /usr/local/bin/node
Yarn: 1.15.2 - ~/.npm-global/bin/yarn
npm: 6.9.0 - ~/.npm-global/bin/npm
Browsers:
Chrome: 73.0.3683.103
Safari: 12.1
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: 3.0.0 => 3.0.0
npmGlobalPackages:
create-react-app: 2.1.8
Don't know why it says create-react-app: 2.1.8, if I do
npm show create-react-app version
it echos3.0.0
.Steps to Reproduce
Install with NPM 6.9.0
Expected Behavior
npm start
starts the serverActual Behavior
fsevents throws:
Because even though chockidar depends on fsevents
1.2.8
, it doesn't get installed, possibly due to chockidar declaring it as an optional dependency: https://github.com/paulmillr/chokidar/blob/master/package.json#L24Instead fsevents v2 gets installed which has a different API which exports a plain object (new keyword breaks on it).
Reproducible Demo
Do
create-create-app
using NPM 6.9.0 and try to run it.The text was updated successfully, but these errors were encountered: