Please note that this template is not optional. If you proceed with this form,
please fill out _all_ fields, or your issue may be closed as "invalid."
Please do not delete this template. Please ask questions on StackOverflow or the
webpack Gitter (https://gitter.im/webpack/webpack). _General questions, how-to
questions, and support requests will be closed._
Please do remove this header to acknowledge this message.
const compiler = webpack(config)
const server = new WebpackDevServer(compiler, {
historyApiFallback: {
index: config.output.publicPath,
disableDotRule: true
},
publicPath: config.output.publicPath,
https: {
key: fs.readFileSync(path.join(__dirname, '../certs/local.key')),
cert: fs.readFileSync(path.join(__dirname, '../certs/local.crt'))
},
hot: true,
host: routes.frontend.hostname,
headers: { 'Access-Control-Allow-Origin': '*' },
port: routes.frontend.port
})
server.listen(error => {
if (error) {
console.log(error)
}
})
The page refreshes and loads the content.
Upon refreshing the page, the dev server crashes with the following error:
events.js:182
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TLSWrap.onread (net.js:610:25)
HMR works as expected. This issue seems to be limited to manual refreshes and chunks that are not hot reloaded.
This can be reproduced on the 3.0.0-alpha6 release with any configuration.
Cheers 馃嵒
I'm getting this pretty consistently on 3.0.0-alpha5 _without_ a manual refresh.
Just a rebuild being triggered via file watching. Unable to find an explicit action that's causing it to crash.
edit: but it does happen _after_ webpack compiles successfully and chrome reloads the page. Haven't been able to reproduce in firefox yet.
Seems to be an unhandled error(ECONNRESET) in the websocket connection in DevServer.js
You can add this on line 128 to fix it for now:
ws.on("error", err => {
log.error(err);
});
@dev357 the above solution "on error", is theres any reason not to introd a temporary fix for the next release?, I find it a bit troublesome to update DevServer.js after each "npm install" i do in-between branch switching
To reiterate: would you greenlight a PR for it ?
I have no affiliation with the wds team so cant greenlight any PRs :)
I created a fork with this fix included, you can use it package.json like this:
"devDependencies": {
"webpack-dev-server": "dev357/webpack-dev-server#next"
}
Yes, an 'error' listener should always be added.
Ref: https://github.com/websockets/ws/issues/1256
All, @next is no longer being worked on. The team has decided in a change of direction. More info to follow, but you should consider the alpha versions of 3.0.0 unsupported.
@shellscape thanks for the update, where's a good spot we could follow updates (re: more info to follow)
Any update available as to the plans for this project? Will there be some other branch? Another project altogether?
Thanks for all your hard work, WDS team :)
@akatechis: Please see v3.0.0-beta.1.
Most helpful comment
I have no affiliation with the wds team so cant greenlight any PRs :)
I created a fork with this fix included, you can use it package.json like this: