I have this in my package json:
webpack-dev-server --config config/webpack.config.js --port 80
I have also tried adding the port to the config like so:
devServer: {
historyApiFallback: true,
host: '0.0.0.0',
port: '80',
},
and it gives the same error:
webpack-dev-server --config config/webpack.config.js --port 80
loader option has been deprecated - replace with "use"
events.js:163
throw er; // Unhandled 'error' event
^
Error: listen EACCES 127.0.0.1:80
at Object.exports._errnoException (util.js:1034:11)
at exports._exceptionWithHostPort (util.js:1057:20)
at Server._listen2 (net.js:1257:19)
at listen (net.js:1306:10)
at doListening (net.js:1421:7)
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:10)
Any help with something i'm doing wrong appreciated, or with what the error is in relation to. Thanks
You will need to either run as root using sudo, or setup a proxy that redirects requests on port 80 to a port over 1024.
Regular users cannot listen on ports lower than 1024, so you cannot listen on port 80.
I'm using Ubuntu and have the exact same issue with port 80. After I add "sudo" in front of "npm run dev" the issue disappears.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With