首页 > vue-cli最后一步出现问题

vue-cli最后一步出现问题

sudo npm run dev
Password:

> my-project@1.0.0 dev /Applications/XAMPP/xamppfiles/htdocs/vvue/my-project
> node build/dev-server.js

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::8080
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at Server._listen2 (net.js:1234:14)
    at listen (net.js:1270:10)
    at Server.listen (net.js:1366:5)
    at EventEmitter.listen (/Applications/XAMPP/xamppfiles/htdocs/vvue/my-project/node_modules/.npminstall/express/4.14.0/express/lib/application.js:617:24)
    at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/vvue/my-project/build/dev-server.js:59:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v4.4.4
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! my-project@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the my-project@1.0.0 dev script 'node build/dev-server.js'.
npm ERR! This is most likely a problem with the my-project package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs my-project
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls my-project
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Applications/XAMPP/xamppfiles/htdocs/vvue/my-project/npm-debug.log
tangdeMacBook-Pro:my-project tang$ 

Error: listen EADDRINUSE :::8080

這錯誤通常指的是 8080 端口已經被其他程序佔用,所以無法啟動。

檢查下 (Mac)

lsof -i tcp:8080 
【热门文章】
【热门文章】