Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

Hot reloading doesn't work on Windows 10 x64 #10

Closed
helarqjsc opened this issue Sep 8, 2015 · 13 comments
Closed

Hot reloading doesn't work on Windows 10 x64 #10

helarqjsc opened this issue Sep 8, 2015 · 13 comments

Comments

@helarqjsc
Copy link

When I follow the instructions from the readme, the boilerplate compiles and pretty much everything works (I can open the server at localhost, the changes I make to the source files cause Webpack's build, etc), except for hot reloading. I have used the original files from this repo without any modifications. I've tested it in multiple browser and hot reloading didn't work in any of them.

There are no errors in the console and [HMR] connected isn't being printed. Webpack build is working fine, whenever I make a change to a file, something like webpack built 981db3a4007a4789937d in 213ms is printed in the console.

I've tried to debug it by adding console.log statements in various places and here's what I've found:

  1. Those events are never triggered.
  2. source variable always has readystate: 0, meaning that connection is never made.

Versions of the soft I'm using:

$ npm -v
2.11.3
$ node -v
v0.12.7

Any ideas what might be wrong or what steps should I take to figure it out?

@helarqjsc
Copy link
Author

As I said, I tested it with the exact files from this repo without any changes.

index.js:

import React from 'react';
import { App } from './App';

React.render(<App />, document.getElementById('root'));

webpack.config.js:

var path = require('path');
var webpack = require('webpack');

module.exports = {
  devtool: 'eval',
  entry: [
    'webpack-hot-middleware/client',
    './src/index'
  ],
  output: {
    path: path.join(__dirname, 'dist'),
    filename: 'bundle.js',
    publicPath: '/static/'
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new webpack.NoErrorsPlugin()
  ],
  module: {
    loaders: [{
      test: /\.js$/,
      loaders: ['babel'],
      include: path.join(__dirname, 'src')
    }]
  }
};

@edgesoft
Copy link

edgesoft commented Sep 8, 2015

Sorry about that. I removed my comment before.

@jgallow
Copy link

jgallow commented Sep 8, 2015

Are you using the latest browsers? I was having the same problem on Win7 until I updated Chrome to 45. I now have HMR working on two different Win10 machines with zero modifications to the repo.

@helarqjsc
Copy link
Author

I'm pretty sure I'm using the latest versions: Chrome 45.0.2454.85 m and Firefox 40.0.3

@helarqjsc
Copy link
Author

When I open http://localhost:3000/__webpack_hmr it's loading infinitely without any output, if that's of any help. There is no firewall on my system and antivirus is currently disabled.

@anorudes
Copy link

anorudes commented Sep 8, 2015

I have the same problem on windows 10 and don't see errors in the console Chrome. Are there any solutions to fix this?

@mayankchd
Copy link

I'm using this on Windows 10 x64 Chrome Version 45.0.2454.85 m and it is working fine for me ! But no dist folder is getting created , i think i'm missing something.

@shinank
Copy link

shinank commented Sep 9, 2015

Im running Win7 x64 with Chrome Version 45.0.2454.85 m (64-bit) and I am having the same problem with the hot reloading not working.

I am using io.js Version 3.3.0 for Windows x64

@dallonf
Copy link

dallonf commented Sep 12, 2015

I'm also doing fine on Windows 10 x64 with Node.js 0.12.7.

I wonder if io.js or Node 4.0 are the ones causing the issue?

@gaearon
Copy link
Owner

gaearon commented Sep 12, 2015

But no dist folder is getting created , i think i'm missing something.

It shouldn't be created; that's just because Webpack wants us to put something in it. (At least it used to crash without a path.)

@anorudes
Copy link

Myabe we need should create socket version for windows?

@gaearon
Copy link
Owner

gaearon commented Sep 16, 2015

Please report this upstream to https://github.com/glenjamin/webpack-hot-middleware/.
I'm afraid I can't help you here.

@gaearon gaearon closed this as completed Sep 16, 2015
@hushegjo
Copy link

Simplest fix this issue (on Win 10 x64): if you are using GitBash as console, set the compatibility mode to Win 7, and restart the console.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants