Webpack: Hot reload has stopped working

Created on 13 Nov 2017  ·  33Comments  ·  Source: vuejs-templates/webpack

I ran a fresh install of vue init webpack this morning, however hot-reloading doesn't seem to work anymore.

Most helpful comment

Seems I finally found it: my $cat /proc/sys/fs/inotify/max_user_watches was on 8192 and this helped me:

echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches

Now Vue hot reload works without sudo and without poll ! ))))
Really closed ;))

All 33 comments

Just did a quick test, works for me. What's your environment? Inside a VM, a dropbox folder or something like that?

HMR has problems in various environments, in those situations you can maybe help yourself with the poll option:
https://github.com/vuejs-templates/webpack/blob/develop/template/config/index.js#L21

Closing since I doubt this is a problem of the template. If you can provide a reproduction of the issue, I'm happy to re-open.

Got the same issue: pure and fresh install on Ubuntu 17.04 (node v6.12.0), all clean and new ( default on all vue init questions):

vue init webpack my-project 
cd my-project
npm install
npm run dev

Changing and saving "HelloWorld.vue" does not hot reload. But in terminal Ctrl-C and again nmp run dev shows changes.
@LinusBorg Indeed, setting poll: true in index.js makes hot reloading working though

  • no VM?
  • no dropbox or other service/tool "watching" the folder the project is in?
  • special characters in the path? Webpack used to not like those as well ...

Other than that I don't really have any ideas.

  • no VM, docker or whatever, just on my new Dell XPS 15
  • no other watchers that I am aware of
  • ~/Websites/Company/websites/my_project

@boltonomous what OS you use?

Sorry for the lack of reply...

  • Mac OSX 10.12.2
  • no VMs, watchers or special characters in the paths (other than underscores and dashes)
  • vue cli 2.9.1

However, I AM seeing it work now. I think what may have thrown me off is that it is no longer automatically launching a browser. I update HelloWorld.vue and am seeing it update in Chrome.

I think what may have thrown me off is that it is no longer automatically launching a browser.

That has nothing to do with Hot Reloading.

You can turn this behaviour on again in /config/index.js

Just double checked again, from scratch, and now with Chrome instead of Firefox... same isseu. No hot reload... Sorry reload stopped working. It worked for me in the past without issues on my other pc

Thanks @LinusBorg for setting me straight. That works in my situation.

No hot reload... Sorry reload stopped working.

I don't understand what exactly stopped working now.

No hot reload... Sorry reload stopped working. <

Just meant to say same, no hot module reload when I leave the poll: false

In Chrome webdev console it says though: [HMR] Waiting for update signal from WDS... so the waiting is ok, just webpack never signals unless it forced to poll.

My version by the way:

npm list webpack
[...]
└── [email protected] 

After _restarting my PC_, hot reload works as intended, so also with poll: false. Double checked and created a new project from scratch and HR fine. Could this be an access right issue for webpack? No idea...

My two cents: try to restart PC if hot reload does not work...

The good old "have you tried turning it off and on again?" - never gets out of fashion :)

And cheered too soon... stopped again :-(

Logout/Login did not resolve
Restart solved it again, but now I wonder for how long ?

Baffled...

@LinusBorg FYI sudo npm run dev does work, so it must be something in my system regarding to permissions.
I suppose you were right closing the issue here. But I still need to figure out how to solve this... maybe some group membership or something missing? Maybe because I downgraded from node v8 to v6 something was screwed up...? Anyway, if I find it, I will report )

Seems I finally found it: my $cat /proc/sys/fs/inotify/max_user_watches was on 8192 and this helped me:

echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches

Now Vue hot reload works without sudo and without poll ! ))))
Really closed ;))

i have same issue with windows10 environment.

  • OS Win10
  • npm 3.10
  • vue-cli 2.8.1
  • fresh install

editing App.vue is triggering hot reload but when editting Hello.vue hot reload is not works.
i also tried run npm run dev using admin powershell but still not works.

I'm now using Ubuntu 16.04 LTS and the solution of @tvld works perfectly :100:

The solution of @tvld works for me in Xubuntu 18.04

@tvld thanks!!!!

Solution from @tvld also fixed the issue for me and I'm on a Ubuntu 18.04 vm. Does anyone have an idea of why this happens?
It's the second time that I need to fix it.

It happens to me using Quasar Framework, I fix it removing the temp directory that dev server generates, maybe could find a similiar solution with vue-cli

Hi, my 2 cents here, I'm using vue cli 3, so after a while and plenty of changes, HMR stops working so after reading this I closed the terminal window where I was executing "npm run serve", and it worked using a new terminal window, if it keeps happening I'll give the solution from @tvld a try, I'm using Ubuntu 16.04.

@tvld You just saved my whole day! I won't forget your help ever lol!

@p01ymath you're welcome... )

@tvld lol, its work. Magic?:D

@tvld well done. thanks!

Still not working for me:

Ubuntu 18.04.2 LTS
Webstorm 2018.3.5
Chrome Version 73.0.3683.75 (Official Build) (64-bit)

Tried restarting, increasing max watchers, disabling "Use safe write" in Webstorm.

When I run "npm run serve", the website loads and this line is output in the console:
"[HMR] Waiting for update signal from WDS..."

If I make changes in a Vue component and save, my terminal session re-compiles the code, but no changes are seen in Chrome.

@cgillions you see the changes if you Ctrl-F5 in Chrome?

@tvld - yes.

After "I make changes in a Vue component and save, my terminal session re-compiles the code, but no changes are seen in Chrome", I can refresh Chrome and the changes appear.

@cgillions then your problem must be not related to this thread. I would suggest to try other browser and check if your code has no sticky errors...

set NODE_ENV=development might solve your problem.

Was this page helpful?
0 / 5 - 0 ratings