react-redux-starter-kit icon indicating copy to clipboard operation
react-redux-starter-kit copied to clipboard

hot reloading is not working for v3 alpha.1

Open alanrubin opened this issue 8 years ago • 13 comments

I have cloned the repo on master (3.0.0-alpha.1) and install dependencies with node v6. Everything executes fine but when I modify any React component the hot reloading does not work (need to refresh the page manually to get the changes reflected). I have tried with 3.0.0-alpha.0 and hot reloading works fine.

You can see from the attached screenshot that __webpack_hmr requests are being cancelled (Chrome v51 on a Mac), I guess that is probably the issue but still cannot figure out what is the difference between alpha0 and alpha1 that is causing that.

Any ideas ? Thanks in advance.

requests

alanrubin avatar Jul 28 '16 18:07 alanrubin

👍 for me as well :(

bowenisdum avatar Jul 28 '16 18:07 bowenisdum

Weird. I just did a fresh npm install and can't reproduce. Does it work in any other browser?

dvdzkwsk avatar Jul 28 '16 19:07 dvdzkwsk

Edit: I did a fresh install on latest master, let me try the exact tag. Could you try the inverse (see if latest master works)?

Edit 2: Works on the exact tag as well. Curious to see what you find.

dvdzkwsk avatar Jul 28 '16 19:07 dvdzkwsk

Sorry I guess I wasn't clear, it didn't work for me on the latest master. I guess I should try the alpha.1 tag, will do that later on.

On 28 Jul 2016, at 20:21, David Zukowski [email protected] wrote:

Edit: I did a fresh install on latest master, let me try the exact tag. Could you try the inverse (see if latest master works)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

alanrubin avatar Jul 28 '16 19:07 alanrubin

@alanrubin don't worry about trying the tag, I doubt it will change, and anyways it should work on latest master. If you could try another browser (or an incognito chrome window) that would help.

dvdzkwsk avatar Jul 28 '16 19:07 dvdzkwsk

It didn't work with Chrome in Incognito mode neither with Firefox.

But I found the solution, in config/index.js, I have replaced the server_host settings by 'localhost' instead of 'localip' and that did the job. Is that something we should have by default ? I guess the problem was that my hmr was using my local IP but the webpage was being accessed with localhost (although I tried to access the webpage using the local IP and with server_host as 'localip' but that didn't work as well)

alanrubin avatar Jul 28 '16 20:07 alanrubin

It should still work with localhost even with localipconfigured. Do you have anything abnormal in your hosts file? The push for localip instead of localhost as the hostname was so users could access their dev server from other devices, and it seemed to be working fairly well.

dvdzkwsk avatar Jul 28 '16 21:07 dvdzkwsk

Nothing really abnormal, pretty much what is showed here. @bowenisdum do you see anything different with your hosts file ? I have checked and my firewall is off as well - I'm running Yosemite on a Mac Pro Mid 2015. If that works for most of the people using this project I guess it is probably something local to my machine. Maybe it is worth adding a line to the FAQ ? I can do a PR for that

alanrubin avatar Jul 31 '16 06:07 alanrubin

I am having the same issue, but replacing server_host with 'localhost' did the trick for me... Apparently, the problem was with hamachi supplying a different local address

johnzielke avatar Jul 31 '16 12:07 johnzielke

@alanrubin a FAQ entry would probably be wise, though I think it would also be helpful to also put it in the instructions for getting started where people are more likely to see it.

dvdzkwsk avatar Jul 31 '16 13:07 dvdzkwsk

@davezuko I can confirm the @alanrubin 's experience. I'm using Windows 10 as an environment and switching localip to 'localhost' fixed the issue. I also tried leaving it on the localip and accessing the website via IP, but that didn't manage to make things better.

I'm using node 5.7.0.

mnemanja avatar Aug 02 '16 14:08 mnemanja

For me this was resolved with uninstalling BitDefender which was blocking eventsource messages for whatever reason. Turning off BitDefender wasn't enough, I had to completely uninstall it. Using the eventsource-polyfill is another possible solution.

njhoffman avatar Dec 06 '16 21:12 njhoffman

When the app tries to load the hot-reload bundle, it tries to use the ip.address() like 10.1.1.1, while the app is running on http://localhost:3000. Hence, the browser gives me an Access-Control-Origin error. I was able to resolve this by using 'localhost', instead of ip.address().

paramaggarwal avatar May 29 '17 09:05 paramaggarwal