Error: listen EADDRINUSE: address already in use 127.0.0.1:8888

npm run serve 报错 Error: listen EADDRINUSE: address already in use 127.0.0.1:8888

Error: listen EADDRINUSE: address already in use 127.0.0.1:8888
    at Server.setupListenHandle [as _listen2] (node:net:1463:16)
    at listenInCluster (node:net:1511:12)
    at doListen (node:net:1660:7)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1490:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRINUSE',
  errno: -98,
  syscall: 'listen',
  address: '127.0.0.1',
  port: 8888
}

经过分析是安装配置了
webpack-bundle-analyzer 生成打包报告,占用了端口

应该修改下端口,或者去掉这个配置.

8888是宝塔的端口, 用宝塔面板的不能关闭此端口.

网上看的解决的全是让关闭8888 端口, 都不知道是这个问题,真是无语了,
不从根本解决问题. 头痛医头脚痛医脚.

你可能感兴趣的:(前端,前端,vue)