New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch is not working in windows #349

Closed
Pines-Cheng opened this Issue Nov 5, 2016 · 13 comments

Comments

Projects
None yet
9 participants
@Pines-Cheng
Copy link

Pines-Cheng commented Nov 5, 2016

when I change the file under components or other file under src ,the auto watch and Compile in not working on Windows. but it is working well on Mac OS. Do you have some prompt ?

The environment
node : v6.9.1
npm : v3.10.8

@yisibl

This comment has been minimized.

Copy link

yisibl commented Nov 6, 2016

I also encountered such a situation.

@shah-newaz

This comment has been minimized.

Copy link

shah-newaz commented Nov 6, 2016

Not working for me on Mac either. Didn't work on Windows on a vagrant box previously

@shah-newaz

This comment has been minimized.

Copy link

shah-newaz commented Nov 6, 2016

Could it be an issue with Vagrant?

@Pines-Cheng

This comment has been minimized.

Copy link

Pines-Cheng commented Nov 7, 2016

I found the reason,It is the problem of Webstorm. @yisibl @shah-newaz
Just like the picture under. cancel the last checkbox.
hope this helps.image

@shah-newaz

This comment has been minimized.

Copy link

shah-newaz commented Nov 7, 2016

Hi @Pines-Cheng , Thanks for the suggestion! However, I don't use Webstorm IDE. Sublime text here with no option as such.

@LinusBorg

This comment has been minimized.

Copy link
Contributor

LinusBorg commented Jan 4, 2017

@shah-newaz dropbox and similar synced folders are a problem as well.

@duebbert

This comment has been minimized.

Copy link

duebbert commented Jan 11, 2017

This can be fixed by using the OldWatchingPlugin(). Add this line to the plugins section in build/webpack.dev.conf.js: new webpack.OldWatchingPlugin(),

Would be great to test if we're running on Windows and then add this plugin automatically.

@LinusBorg LinusBorg closed this Jan 20, 2017

@AndrewBogdanovTSS

This comment has been minimized.

Copy link

AndrewBogdanovTSS commented Feb 7, 2017

@Pines-Cheng thanks for your suggestion, but it didn't help. Still no hot reload, no change basically

@shah-newaz

This comment has been minimized.

Copy link

shah-newaz commented Feb 7, 2017

Hey @AndrewBogdanovTSS , What OS are you using ?
For MacOS and Windows, I had to add watch poll to webpack.

Can you try something like this on your webpack dev server config file?

    publicPath: clientConfig.output.publicPath,
    stats: {
      colors: true,
      chunks: false
    },
    watchOptions: { 
      aggregateTimeout: 300, 
      poll: true 
    }
  })

Check the,

watchOptions: { 
    poll: true 
}

Part. Hope that helps!

@AndrewBogdanovTSS

This comment has been minimized.

Copy link

AndrewBogdanovTSS commented Feb 7, 2017

@shah-newaz my OS is Win10
I've found what the problem was in my case. I used square brackets [] in the projects directory path. How stupid is that a person can't use brackets in the name of the folder? My path was
C:\Projects\Study[Vue]\VueCLI\my-app
when I've changed it to
C:\Projects\Study\Vue\VueCLI\my-app
it magically started working
it definitely looks like a bug that should be addressed by a webpack team.

@sumtui

This comment has been minimized.

Copy link

sumtui commented May 10, 2017

For any late arrivers here then I had this same issue on Linux and I spent hours trying to resolve it trying all solutions above to no avail. Then I rebooted and all works fine now. Very strange.

@CarlosVillasenor

This comment has been minimized.

Copy link

CarlosVillasenor commented Apr 11, 2018

In my case the It worked for me Increasing the amount of inotify watchers:
https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers

@boka18

This comment has been minimized.

Copy link

boka18 commented Oct 1, 2018

@CarlosVillasenor you the man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment