1
我有这个在我的包JSON:试图更改端口80的WebPack-dev的服务器上提供了错误
webpack-dev-server --config config/webpack.config.js --port 80
我也尝试添加该端口的配置,像这样:
devServer: {
historyApiFallback: true,
host: '0.0.0.0',
port: '80',
},
并给出了同样的错误:
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)
的东西任何帮助,我做错了赞赏,或用误差是RELAT什么离子。谢谢
普通用户不允许绑定到端口80,低于1024的端口需要root/adminstrator权限。这就是为什么这些进程通常使用像3000或8080这样的端口。为什么你想在端口80上运行它? – robertklep
如果你在Mac上,会使用sudo帮助吗? sudo webpack-dev-server --config config/webpack.config.js --port 80 –