question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack rebuilds, but dev server won't restart

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

6reactions
roof12commented, May 11, 2016

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

0reactions
realbuggercommented, May 27, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack dev server compiling successfully but reload or ...
I'm having problems with the webpack dev server, when running the script npm run frontend (during development) to see changes in the browser ......
Read more >
Why webpack-dev-server Live-Reload Is Not Working - Medium
Q6: When I modify javascript files, I have to manually run Webpack CLI to see changes to bundle. js in the local filesystem,...
Read more >
Improving Webpack Developer Experience - In Plain English
Webpack Dev Server's hot reloading automatically rebuilds when it detects code and dependency changes, but there are cases where this detection ...
Read more >
DevServer - webpack
If you want to manually recompile the bundle, navigating to the /webpack-dev-server/invalidate route will invalidate the current compilation of the bundle and ...
Read more >
webpack-dev-server (3.6.0): What I wish I knew | by Nick Arthur
If you're debugging your WDS config, delete your built webpack files. This way if your WDS config is messed up you won't get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found