npm Error: listen EADDRINUSE 127.0.0.1:8080

Error: listen EADDRINUSE 127.0.0.1:8080
    at Server.setupListenHandle [as _listen2] (net.js:1335:14)
    at listenInCluster (net.js:1383:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1509:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)
Emitted 'error' event at:
    at emitErrorNT (net.js:1362:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-demo@ dev: `cross-env NODE_ENV=development webpack-dev-server --open --inline --hot --port 8080`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-demo@ 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!     C:\Users\MX\AppData\Roaming\npm-cache\_logs\2018-07-24T09_07_38_445Z-debug.log
 

 

EADDRINUSE: 给定的地址已经被使用 
端口被占用

解决:

sudo lsof -i :8088 // 查看端口使用情况
sudo kill -9 47862 // 杀死展示的PID

你可能感兴趣的:(npm Error: listen EADDRINUSE 127.0.0.1:8080)