dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.29k stars 2.2k forks source link

hot-reloading in Windows not functioning #902

Open brandonmp opened 8 years ago

brandonmp commented 8 years ago

[ETA: tried cloning/running react-redux-starter-kit on my win10 laptop & hot-reloading worked like a charm. welcoming any suggestions on what difference b/t two environments could be to cause this, but as of now, can say w/ some certainty this isn't a bug in repo]

Anyone run this kit on a windows machine?

On my win10 comp, I loaded a repo for a project that used this boilerplate. Started up good, but hot-reloading isn't working.

I cloned the react-redux-starter-kit repo fresh, and it confirmed the issue. I also cloned it fresh in an Ubuntu 16.04 VM, wherein everything worked fine.

GET http://192.168.56.1:3000/__webpack_hmr net::ERR_CONNECTION_RESET

(I say 'sporadically' because it doesn't happen on saving changes, and the message isn't predictably thrown)

Output from terminal on-run:

C:\code\react-redux-starter-kit>  npm start

> react-redux-starter-kit@3.0.0-alpha.0 start C:\code\react-redux-starter-kit
> better-npm-run start

running better-npm-run in C:\code\react-redux-starter-kit
Executing script: start

to be executed: "babel-node bin/server"
  app:config Creating default configuration. +0ms
  app:config Looking for environment overrides for NODE_ENV "development". +11ms
  app:config Found overrides, applying to default configuration. +5ms
  app:webpack:config Create configuration. +888ms
  app:webpack:config Enable plugins for live development (HMR, NoErrors). +2ms
  app:server:webpack-dev Enable webpack dev middleware. +259ms
  app:server:webpack-hmr Enable Webpack Hot Module Replacement (HMR). +29ms
  app:bin:server Server is now running at http://192.168.56.1:3000. +23ms
  app:bin:server Server accessible via localhost:3000 if you are using the project defaults. +1ms
webpack built 764909cfcfbb11714876 in 4217ms
Hash: 764909cfcfbb11714876
Version: webpack 1.13.1
Time: 4217ms
                                Asset       Size  Chunks             Chunk Names
          app.764909cfcfbb11714876.js    1.05 MB       0  [emitted]  app
    1.counter.764909cfcfbb11714876.js    30.6 kB       1  [emitted]  counter
       vendor.764909cfcfbb11714876.js     387 kB       2  [emitted]  vendor
      app.764909cfcfbb11714876.js.map    1.28 MB       0  [emitted]  app
1.counter.764909cfcfbb11714876.js.map      38 kB       1  [emitted]  counter
   vendor.764909cfcfbb11714876.js.map     464 kB       2  [emitted]  vendor
                          favicon.ico    24.8 kB          [emitted]
                           index.html  604 bytes          [emitted]
Child html-webpack-plugin for "index.html":
         Asset    Size  Chunks       Chunk Names
    index.html  553 kB       0
webpack: bundle is now VALID.
jednano commented 8 years ago

Hot loading works for me when I change "Welcome!" to "Welcome Home!" on the home page. I'm on Windows 10.

k-dahl commented 8 years ago

Edit: My own issues below seem to come down to WebStorm and an option called 'safe write' where it will first save changes to a temporary file, this then appears to interfere with the watcher setups.

I've been running into this as well, though I can definitely say that it's more than hot reloading - any of the watch tasks in the package.json only seem to intermittently fire when files are actually saved on Windows 10. Even more strange when running test:dev and start concurrently, sometimes one will fire but not the other, but sometimes neither of them detect any change. It's very frustrating.

I have used a similar webpack based starter kit on a different Win 10 without running into any of these issues, and I have also use this (react-redux-starter-kit) on Linux without any issues as well, so I'm not sure where the problem lies.

jednano commented 8 years ago

I'm using vscode with success.