-
-
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
Updating Files Does not Cause HMR Reload #659
Comments
I had this issue when working with a project that was in a dropbox folder. Hasn't affected any of my projects were outside the folder though. |
Not exactly the same, but feels related: Sometimes saving a js-file doesn't trigger the livereload. When I save it a second time it works. Sorry for the lack of details, but happens every now and then and I haven't been able to pinpoint the cause. On windows 10, latest CRA, editing with vim in gitbash. |
Same here. In fact I have a very simple project with no nested directories and the rebuilding/reloading is spotty at best. It will just stop rebuilding and hot-reloading so I am continuously having to stop the process and start it all over again. IMHO this is the biggest impedance to a smooth development experience with CreateReactApp. You guys have done such an amazing job thus far, if you could just get this and css preprocessors working you will have nailed it! Keep up the good work! |
Can you reproduce this with a freshly created app, or only in existing apps? |
This could be related to the "safe write" feature some editors use. See "Working with editors/IDEs supporting safe write" from the webpack-dev-server docs. If this fixes it, and I think it will because I've seen dozens of issues in WDS because of this, I'd suggest to very clearly document this somewhere in CRA :). |
Thanks for jumping in. I totally forgot about it. @danielstern @tbillington @ippa @cpeele00 Does this help? |
@gaearon I'll give it a shot and will get back to you. Thanks! |
@SpaceK33z: that url seems broken? it doesn't jump to any specific part of the page and I can't even find the word "safe". |
I have a fresh install of create-react-app on Debian 8.5 using text editor Atom and Chrome for browser. When I change App.js and save the reloading is not happening. Any ideas? |
Some more things to try here: https://webpack.github.io/docs/troubleshooting.html#watching |
@gaearon Absolutely, I was using IntelliJ. It turns out, the Safe Write feature was causing this.Is there some kind of universal |
@danielstern, unfortunately this is not supported in editorconfig. But it's a great idea I think! Maybe propose that to the people at http://editorconfig.org/ ? |
Another thing that can cause HMR to stop working is parenthesis in a path name. |
@danielstern what did your npm tests return? I was facing something similar and I had to increase the the max_users_watches http://stackoverflow.com/questions/16748737/grunt-watch-error-waiting-fatal-error-watch-enospc |
Thank god, this issue was driving me crazy. |
Oh I made sure of that ;). It's mentioned in the watch docs and is explained at the top of the "how to develop" guide. |
Anybody wants to make a PR to Troubleshooting in CRA User Guide? |
FWIW, i just tried create-react-app for the first time and hit this. I moved my project out of my Dropbox folder and the problem went away immediately. |
i have the same problem in Sublime |
Have you checked all documented causes? |
sry |
In my case it seems like global [email protected] installation caused create-react-app webpack watcher issues: it didn't see any file changes. After I removed global webpack, reinstalled create-react-app, recreated application it started to wok fine. Sublime @ Ubuntu 16.04 |
@s-ilya Do you mind adding this to the list in https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-start-doesnt-detect-changes? |
@gaearon Surprisingly I can't reproduce it now. I will check again later with different versions of 2.x (if there were any). |
I'm having this issue as well, but I do not believe it to be caused by the listed issues. My current setup is that I am running the project inside a vagrant virtual machine, and editing my files in Atom on my host machine (Windows). I was able to confirm that it's not my specific project by creating a new app with My best guess is that it doesn't like it being a shared folder across the vm and the host. Any ideas on how I can fix this without having to get rid of my vagrant setup? To confirm that it's not a listed issue,
|
I have one more question here: |
This is currently not supported but you can track #1070. |
@gaearon do you have any thoughts on how I can fix my VM issue, above? |
Sorry, not really. Maybe you can ask in the Webpack repo. |
@merlinpatt I've used the advice here successfully: #1049 (comment) |
@AJamesPhillips Would you like to contribute this to the relevant Troubleshooting section? |
@AJamesPhillips that worked for me, thanks. If anyone doesn't want to click the link, the advice was to use
|
@s-ilya's advice worked for me.
Worked a charm. |
@SpaceK33z which worked for me! thx! |
I just confirmed that my problem was Dropbox. sigh. When you have dropbox for business, it renames your personal Dropbox folder to Dropbox (Personal) They do not allow you to rename it. Even with a symlink, doing a ps, I see:
As soon as I moved the directory out of Dropbox it worked fine with no other changes. |
@johnquillen this just saved me a lot of pain, thank you!! |
I had this problem in WebStorm, disabled |
I had the pleasure of experiencing this same exact issue. Everything was working like a charm and suddenly the server stopped to update the bundle: it was working only on the first compile, then I needed to start and stop all the time to see the code changes. 😕 ❓ Well, finally I discovered the reason: I don't know how but basically one of my files got renamed to lowercase (e.g. I'm working on OSX so I did the good old hack I know that's a dumb issue... however they're the worst to discover sometimes, so sharing just in case it could help somebody. 😅 |
Hmm. I would expect that |
I’m going to close this since common causes and workarounds are documented. |
@SpaceK33z thanks, works like a charm |
@gaearon sorry if this has been asked elsewhere Does CRA watch files in |
If everything else fails, you can also try this:
In my case, that was enough to kick it in the head, so that it would start compiling/reloading again. |
I'm having this issue ; it only updates when I focus either on the browser or the terminal window (running i3). |
@SpaceK33z thanks. |
Anyone who has faced this problem: I have fixed the error just with renaming the folder (I had just one folder, which didn't react to updates, so I renamed it from Includes to Shared). |
@elmario89 Thank you so much your way is worked for me! |
guys, im running my react app in a kubernetes pod and source is mounted from host machine. when i change my code in host npm doesn't update, how can i resolve this? |
On Ubuntu start dev command with |
I'm working in an application with lots of nested directories and .js files.
Sometimes, after I modify and save the file, it simply... does not update or rebuild. I have to stop the process and restart it.
What's the solution to this?
The text was updated successfully, but these errors were encountered: