GeezerVison is showing github.com — Updating Files Does not Cause HMR Reload · Issue #659 · react/create-react-app
Updating Files Does not Cause HMR Reload #659DescriptionI'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? Reacted by Zetta Flow, Simon Taranto, Aviad Moreshet, andrew, Tianyu Li, Edmundo Santos, rgupta2504, Martins Untals, doejon, Michael Liendo and 8 more Activitytbillington commented on Sep 16, 2016 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. Reacted by Austin Riley and Ray ippa commented on Sep 16, 2016 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. cpeele00 commented on Sep 16, 2016 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! gaearon commented on Sep 16, 2016 Can you reproduce this with a freshly created app, or only in existing apps?
Has this been always happening, or just recently?
Could you please share your system versions? SpaceK33z commented on Sep 17, 2016 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 :). Reacted by Arthur Dean, Aviad Moreshet, levidobson, jetpackpony, Denis Zenkovich, Mike A, Sergei Lissovski, coulditbemagic, Tianyu Li, Michael and 17 more Reacted by huasambo and David Pohan gaearon commented on Sep 17, 2016 cpeele00 commented on Sep 18, 2016 @gaearon I'll give it a shot and will get back to you. Thanks! ippa commented on Sep 18, 2016 @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". gaearon commented on Sep 18, 2016 It didn't show up for me at first but I saw it after refresh.

Reacted by Josh Hornby, Aviad Moreshet, Christian Wilcox, Evan Sendra, Gabriel Mičko, Jack Muratore, Mitchell Davis, Ke Wang, Ilya Dorman, Michael Liendo and 10 more Reacted by Gabriel Mičko, Michael Liendo and prat Reacted by psono SpaceK33z commented on Sep 18, 2016 @ippa, apparently some dude renamed the whole wiki page for webpack-dev-server to "react-hot", causing some weird issues :(. I renamed it back now, so it should work again.
@gaearon haha see your comment just popping up, see above ;p. GramParallelo commented on Sep 19, 2016 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? gaearon commented on Sep 19, 2016 Reacted by Jiraffe7 Reacted by GramParallelo and lucasea777 danielstern commented on Sep 20, 2016 @gaearon Absolutely, I was using IntelliJ. It turns out, the Safe Write feature was causing this.Is there some kind of universal editor_config setting that could disable this in editors? andriyartemenko commented on May 16, 2017 I had this problem in WebStorm, disabled safe write in settings and now everything is fine. nuragic commented on May 21, 2017 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. Lol.js -> lol.ls). 
I'm working on OSX so I did the good old hack git mv lol.js lool.js && git mv lool.js Lol.js (then commit/amend) to solve it. More info: https://coderwall.com/p/mgi8ja/case-sensitive-git-in-mac-os-x-like-a-pro
I know that's a dumb issue... however they're the worst to discover sometimes, so sharing just in case it could help somebody. 😅 gaearon commented on May 22, 2017 Hmm. I would expect that case-sensitive-webpack-plugin (which we include) would catch that. gaearon commented on May 22, 2017 I’m going to close this since common causes and workarounds are documented. huasambo commented on Jun 6, 2017 frederickfogerty commented on Jul 2, 2017 @gaearon sorry if this has been asked elsewhere
Does CRA watch files in node_modules? If not, is there a way I can move a node_module into a place where it will be watched? awgv commented on Sep 26, 2017 If everything else fails, you can also try this:
- Delete any source file
- Reload
localhost tab, it’ll show an error
- Stop the server
- Put the files back
- Start the server again
In my case, that was enough to kick it in the head, so that it would start compiling/reloading again. sdistefano commented on Oct 11, 2017 I'm having this issue ; it only updates when I focus either on the browser or the terminal window (running i3).
I tried everything here without any luck. Running on intellij inside a virtualbox. sergshyn commented on Nov 23, 2017 elmario89 commented on Dec 22, 2017 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).
Maybe this will be helpful... Reacted by Nezih, Lina Jones and Łukasz Buczkowski nzhtrtlc commented on Apr 9, 2018 @elmario89 Thank you so much your way is worked for me! Reacted by Mikhail Smirnov frodood commented on Oct 19, 2018 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? christianwish commented on Oct 26, 2018 On Ubuntu start dev command with sudo solves the problem for me.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|