webpack-dev-server Version: 2.9.4
[x] This is a bug
Dev-Server starts
Dev-Server throws an error:
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EACCES 127.0.0.1:80
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1334:19)
at listenInCluster (net.js:1392:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1501:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
Command used:
./node_modules/.bin/webpack-dev-server
Try to use dev-server with this webpack.config.js
@Wavum that means the port you specified is in use. Please see the issue template about support questions and use one of the available options in the future.
it is more than access-grant issue than port-in-use issue. I faced the same problem and still don't don't find a clue how to solve it.
For a quick solution run your webpack-dev-server with sudo I could manage to start dev server with sudo.
May or may not be useful but sometimes when I run into these issues I pass the --no-optional flag magic
I ran into the same error message. It turns out I had previously installed tomcat web server on my machine. Tomcat was already utilizing 127.0.0.1:80 (which means tomcat is running on port 80)
The error message is a little confusing since the first error message is about "events.js:183
throw er". But you can ignore that. The real issue is the port conflict:
Error: listen EACCES 127.0.0.1:80
To resolve the issue, I updated webpack.config.js to use a different port instead of the default port 80. For me, port 9000, worked great. Here's my complete webpack.config.js file, with the port 9000 specified on one of the last lines:
module.exports = {
entry: [
'./src/index.js'
],
output: {
path: __dirname,
publicPath: '/',
filename: 'bundle.js'
},
module: {
loaders: [{
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['react', 'es2015', 'stage-1']
}
}]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
devServer: {
historyApiFallback: true,
contentBase: './',
port: 9000
}
};
@VayaBuzz Thanks for your answer, I had the same issue before, but now I change the port so that the problem had been fixed.
Most helpful comment
@Wavum that means the port you specified is in use. Please see the issue template about support questions and use one of the available options in the future.