webpack配置端口号错误,options.startPort(80) is less than 1024

坠入
  • 11

原配置:

    host: 'localhost',
    port: 80, 
    autoOpenBrowser: true,
    errorOverlay: true,
    notifyOnErrors: true,
    ......

跑不起来,报错如下:

Error: Provided options.startPort(80) is less than 1024, which are cannot be bound.
    at Object.exports.getPort (E:\workspace\vue\gitProj\dcim-saas-console\node_modules\portfinder\lib\portfinder.js:106:13)
    at module.exports.Promise (E:\workspace\vue\gitProj\dcim-saas-console\build\webpack.dev.conf.js:82:13)
    at new Promise (<anonymous>)
    at Object.<anonymous> (E:\workspace\vue\gitProj\dcim-saas-console\build\webpack.dev.conf.js:80:18)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at requireConfig (E:\workspace\vue\gitProj\dcim-saas-console\node_modules\webpack\bin\convert-argv.js:97:18)
    at E:\workspace\vue\gitProj\dcim-saas-console\node_modules\webpack\bin\convert-argv.js:104:17
    at Array.forEach (<anonymous>)
    at module.exports (E:\workspace\vue\gitProj\dcim-saas-console\node_modules\webpack\bin\convert-argv.js:102:15)
    at Object.<anonymous> (E:\workspace\vue\gitProj\dcim-saas-console\node_modules\webpack-dev-server\bin\webpack-dev-server.js:223:50)

有大佬知道原因吗?我换个8080的端口就可以了,是不能小于1024吗,为什么啊

回复
阅读 3.2k
1 个回答
liximomo
  • 4.1k
✓ 已被采纳

端口号不能小于1024. 1024以下都是专用端口.

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏