-
-
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
When I yarn upgrade a package I have to restart create-react-app server #2956
Comments
Is no one else experiencing this? I spend a significant chunk of time restarting my CRA server every day. I can look into fixing this if someone points me in the right direction. Thank you! |
Please investigate if you can. This code was supposed to protect against it. |
@gaearon that plugin sadly just watches for missing dependencies at compile time, that is after a file in user-land has changed. In this case, when you add/remove/update a dependency a recompilation should be issued, so I see no other options than properly watching |
Oh, I remember now. That plugin only handled the case where you forget to install a package and it gets stuck saying "module not found". It probably didn't handle reinstalls/updates.
We can try that and then exclude some bad cases (e.g. |
If using node's |
@maciej-ka it should be possible to use webpack's internal watcher, just by tweaking its "ignore" config to watch e.g. |
@EnoahNetzach can you post some example code for what needs to be done to get it to stop ignoring those files? This issue still bothers me all the time |
webpack has an "ignore" config in watch mode, which accepts anymatch patterns (regex/globs/functions). The idea could be to update the If there were lookahead support in node < 9, there would be as simple as adding Then webpack would theoretically recompile as soon as any |
There is a way to mimic lookahead with |
Is there any movement or workarounds on this? This is very time consuming when working with locally linked packages as every singe change requires a react app restart. Maybe worth seeing how angular handles this live reloading out of the box? |
For anyone stumbling across this issue the problem stems from
You could eject and comment out the watch option (or remove them) but I did not want to eject. My workaround was to use to use the
Create
|
I gave this a try, but it didn't have any effect for me. Is there some other step I'm missing? Is this still working for you? |
This is a serious issue that consumes developer time, I would like to work on it if someone could guide me |
Rather than watching This is helpful for cases where you're installing packages from e.g. GitHub, where your Calling |
This is expected behaviour, but we'd recommend looking at something like nodemon to help manage situations like this. |
When I run yarn upgrade package-name-xxx, I need to restart the dev server in order to see those changes.
Here are steps to reproduce. (Note the following example uses a an npm package I made, https://github.com/tnrich/semver-console , that just console logs its semver number when required.)
In terminal tab #1:
In terminal tab #2:
At the top of
yarn-upgrade-test/src/App.js
add:in the browser console you'll now see:
In terminal tab #2 run:
in the browser console you'll still see:
instead of the expected
Note: The bulk of this issue was already in a comment in #2606
This is quite a pain point for us because we use a lot of linked npm packages when developing our app and the start up time is quite slow for create-react-app.
Any help getting this resolved would be greatly appreciated. Thanks!
The text was updated successfully, but these errors were encountered: