-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Question: react-scripts start constantly @ 30% CPU #1670
Comments
Do you have |
I would recommend running |
Huh. That was it. Wow. I had to wait a fair bit for npm to install (switched to yarn some time ago and haven't looked back), but yeah, CPU is totally normal now with an npm based install. Thanks (pretty sure nodemon relies on fsevents somewhere in the stack, so useful to know). |
Can you provide a tiny project that reliably reproduces this issue? I'm not sure we ever filed this problem with Yarn so would be nice to have it. I tried to create a new project with Yarn, and |
Gosh…okay. The project I'm working on has grown (number of files) quite a bit, so I'll have a crack, but can't guarantee anything. Actually a thought, are the react-scripts watching the entire directory for changes? It might be related to that, and potentially including large node_module dir and some large data files (though, I'm fairly sure the size of the file doesn't affect the watching process…) |
It normally should only watch the dependency graph, but yes, this includes files in It may be related to that. If it’s too much effort to trim down, please don’t worry. |
I'll still give it a go, it's fairly easy to copy then delete stuff out, take a 50/50 approach. |
Thanks, I really appreciate it. I know it’s annoying to spend time on this. |
It quite hard to reproduce the issue.. I also see this, but after a reinstall it works fine again. However, this might help: I notice that it seems in my previous install, fsevent is failed to run (it said something about the binary). This means the fsevent folder is existed in my node_modules folder, but it still using a lot of CPU, so I think check if fsevent is installed is not enough.. Also, I reinstall with Yarn, so maybe it not because Yarn or NPM, at least in my case. They works both fine this time (run fsevent succesfully) |
Also @gaearon , regarding this:
https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/scripts/start.js#L278 |
I'm not sure to be honest 😛 |
I'll close this; let me know if this still happens! |
This is a general question (and first time using create-react-app) - I've been using it for about a month, but I notice that when the
react-scripts start
is running, in an idle state, the CPU is running about 30% for the node process.Is that normal?
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected): [email protected]node -v
: v7.0.0npm -v
: 3.10.8 (but using yarn for installs - v0.15.1)Then, specify:
The text was updated successfully, but these errors were encountered: