Webpack: Hot reload not working in fresh install

Created on 7 Sep 2017  路  5Comments  路  Source: vuejs-templates/webpack

Hello

I'm having an issue where hot reload is not working in a fresh install.

The solution mention at this issue is not working for me, my vue-cli version is 2.8.2.

Any ideas why this might be happening?

Most helpful comment

I changed in config/index.js, under dev from poll: false to poll: 1000, and that worked too

All 5 comments

Updating vue-cli shouldn't have any effect on the project code -- it's just for templating.

What OS is your project on? Is the project in a folder with any special settings that could interfere with operating system events (e.g., Dropbox folder)?

I had the same problem, except it somehow affected all my projects (fresh installs and existing).
I'm running Fedora 25 and node v6.11.2

I'm not sure what the actual problem was, but I managed to fix it. I'm a bit surprised this works:

  1. Delete your node_modules/ directory. I also deleted my ~/.npm directory but I'm not sure if this is required
  2. Install yarn
  3. yarn install

And now it works. Reinstalling all dependencies with npm didn't work, so it must be doing something wrong...

Actually this issue has reappeared. The fix this time is mentioned in a comment in #378.

Adding the following to the webpack-dev-middleware config solved the issue this time:

watchOptions: {
  aggregateTimeout: 300,
  poll: 1000
}

I changed in config/index.js, under dev from poll: false to poll: 1000, and that worked too

geniass's solution (with using yarn) works for me properly

Was this page helpful?
0 / 5 - 0 ratings