美文网首页
vue项目启动报activeevents.js:180错误

vue项目启动报activeevents.js:180错误

作者: Geroge1226 | 来源:发表于2020-06-08 10:11 被阅读0次

vue 使用 npm start报如下错误

> my-project@1.0.0 start /Users/longshiyang/Documents/vueWorkSpaces/family-admin-front
> npm run dev


> my-project@1.0.0 dev /Users/longshiyang/Documents/vueWorkSpaces/family-admin-front
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 10% building modules 1/1 modules 0 activeevents.js:180                            
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRNOTAVAIL: address not available 27.0.0.1:8080
    at Server.setupListenHandle [as _listen2] (net.js:1211:19)
    at listenInCluster (net.js:1276:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1415:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:65:10)
Emitted 'error' event at:
    at emitErrorNT (net.js:1255:8)
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  code: 'EADDRNOTAVAIL',
  errno: 'EADDRNOTAVAIL',
  syscall: 'listen',
  address: '27.0.0.1',
  port: 8080
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the my-project@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/longshiyang/.npm/_logs/2020-06-05T08_06_23_073Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project@1.0.0 start: `npm run dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the my-project@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/longshiyang/.npm/_logs/2020-06-05T08_06_23_091Z-debug.log

原因:
congfig下index.js文件下localhost无法识别问题

image.png

经过查看本地hosts文件发现localhost文件映射ip编程了27,还原成127.0.0.1即解决问题。


image.png

相关文章

网友评论

      本文标题:vue项目启动报activeevents.js:180错误

      本文链接:https://www.haomeiwen.com/subject/poiazhtx.html