Webpack-hot-middleware: Hot middleware not updating

Created on 24 Feb 2016  路  12Comments  路  Source: webpack-contrib/webpack-hot-middleware

Hi everyone.

I'm using hot middleware for our web application with some peers.
We're sharing the same code but it seems that it's not building my bundle again (so then not updating my application) when I'm saving it on my text editor.

However it totally works on my peers computer...
We're using the same version of package installed by npm.

For example I cloned this repo https://github.com/reactjs/redux/tree/master/examples/async
Then npm install, launch the server, it builds the bundle once then nothing else when I try to modify some component.

Do you guess where it comes from? Thanks!

awaiting-input

Most helpful comment

@shunxing I had similar problem altho on arch linux. Problem was with inotify, it had pretty low value. This helped https://wiki.archlinux.org/index.php/dropbox#Filesystem_monitoring_problem . I guess it works similar if not the same on Ubuntu.

All 12 comments

Are you on OS X, Linux, Windows?

Are you using a virtual machine, or any sort of non-local filesystem (NFS, SMB, etc)

I'm using Ubuntu 14.04 lts on my local machine.

Could it be something with a corporate proxy?

My browser and all the stuff can work under my current proxy

Is there logging in the console when something changes?

No, nothing changes. There is no new bundle created

Hrm, that usually points towards an issue with filesystem change detection. What filesystem are the files on?

You might want to look into enabling polling mode for watching, there should be a webpack option somewhere to set this.

You could also try using a normal webpack --watch on the commandline to see if that can see changes. If it can't, then the bug definitely isn't with this module.

Oh i got this in my JavaScript console at first:

The connexion with http://127.0.0.1:3000/__webpack_hmr has been interrupted while the loading of the page

However, I got the HMR connected at the end of the page loading

How can I webpack watch mode in my server.js?

That message is just the previous page closing it's connection.

Rather than getting your server running with middleware, I suggest debugging using webpack on it's own to see if that works:

node_modules/.bin/webpack --config <path-to-config>

https://webpack.github.io/docs/tutorials/getting-started/

I've tried these instructions to test on watch mode but it seems that my bundle is not updated when I modify it.

It's directly related to webpack but I don't know where it can come from.

I think this is my personnal machine...
I've tried the same package.json on a different machine and it works perfectly..
Do you know what kind of dependancies can cause this kind of issue only with webpack?

@glenjamin

Could it be the filesystem which is corrupted ?

@shunxing I had similar problem altho on arch linux. Problem was with inotify, it had pretty low value. This helped https://wiki.archlinux.org/index.php/dropbox#Filesystem_monitoring_problem . I guess it works similar if not the same on Ubuntu.

Not sure if this will be of any help but, I've experienced a similar issue that I was able to remedy by taking my files out of Dropbox.

Was this page helpful?
0 / 5 - 0 ratings