React-redux-universal-hot-example: Webpack rebuilds, but dev server won't restart

Created on 6 May 2016  Â·  9Comments  Â·  Source: erikras/react-redux-universal-hot-example

Anyone having this weird problem? The hot reloading has been doing fine (other than occasional crash and somewhat slowness) until recently. Under npm run dev, whenever a code change is made, webpack rebuilds, but the dev server on http://localhost:3000 won't restart. In the console window, I only see

[1] [piping] File src\xxx.js has changed, reloading.
[0] webpack building...
[0] webpack built 97077085b02e470dd6b2 in 3465ms

But no

[1] ----
[1] ==> ✅  XXX is running, talking to API server on 3030.
[1] ==> �  Open http://localhost:3000 in a browser to view the app.

Now the really weird thing is, if I just go ahead refresh the page, I'll first get a 'site can't be reached' error. But shortly after (2 - 5 seconds, maybe?), the dev server starts, and everything back to normal. It's almost like the dev server went into hibernation and needs a request to wake it up.

My dev.config.js is pretty much stock except devtool is changed to cheap-module-source-map. I'm running node v5.9.0 and npm 3.7.3 on windows 10.

Most helpful comment

I've been seeing similar behavior as @realbugger, but the application server never successfully restarts. After changing a file, I see this:

[piping] File src\containers\About\About.js has changed, reloading.

Previously I would see this:

[piping] File src\containers\About\About.js has changed, reloading.
----
==> ✅  Halo Link is running, talking to API server on 3030.
==> 💻  Open http://10.1.10.246:3000 in a browser to view the app.

After a change and an unsuccessful restart, the application does not work correctly. API requests are not proxied to the API server, for one. A browser reload of any page triggers the restart of the application server and then things work.

After finding the issue below I locked piping to 0.3.0 and everything works:

https://github.com/mdlawson/piping/issues/15

All 9 comments

dev server restarting takes much longer time than before, doubt on node-sass and some other packages.

I ran into the same problem after updating some dependencies ( or at least that's what i think is causing it)
posted it on stackoverflow but didnt get any answers yet. I really hope I can find out what's causing this soon, as this is really annoying and time consuming to completely restart the server and wait 17 seconds for a build.

I m using, linux mint 17.3, node 5.6.0 and npm 3.6.0.

616 each ES6 syntax in src/server.js takes several seconds.

@tearsofphoenix the build is slow indeed, but the biggest problem is the server takes like 1 minute to restart, or does not seem to restart at all

@feesjah HappyPack && DLLPlugin help me speed up build time. Deserve to try

After going back to 'stock' package.json I have exactly the same problem as @realbugger . :(
It's really annoying to have to refresh and lose state

I've been seeing similar behavior as @realbugger, but the application server never successfully restarts. After changing a file, I see this:

[piping] File src\containers\About\About.js has changed, reloading.

Previously I would see this:

[piping] File src\containers\About\About.js has changed, reloading.
----
==> ✅  Halo Link is running, talking to API server on 3030.
==> 💻  Open http://10.1.10.246:3000 in a browser to view the app.

After a change and an unsuccessful restart, the application does not work correctly. API requests are not proxied to the API server, for one. A browser reload of any page triggers the restart of the application server and then things work.

After finding the issue below I locked piping to 0.3.0 and everything works:

https://github.com/mdlawson/piping/issues/15

So I don't know if this is the same issue, but the hot reloading is definitely not working. As @roof12 mentioned, I am actually using 0.3 and seeing

[piping] File src\containers\About\About.js has changed, reloading.
----
==> ✅  Halo Link is running, talking to API server on 3030.
==> 💻  Open http://10.1.10.246:3000 in a browser to view the app.

But, the issue is that the hot reload does not kick in. So what happens is,

  1. the page doesn't change
  2. refreshing the page results in,
  3. showing the changed view
  4. but immediately changing to a previous state

I believe this is because the backend universal got the change but not the frontend being served through hmr.

Thoughts?

It looks like the problem can be solved by upgrading piping package to the latest version (which is 1.0.0-rc.1 as of now). Please see #1068 for detail.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sunkant picture sunkant  Â·  4Comments

ansonla3 picture ansonla3  Â·  4Comments

sauravskumar picture sauravskumar  Â·  6Comments

skywickenden picture skywickenden  Â·  4Comments

eromoe picture eromoe  Â·  5Comments