2016-10-12 22:59:32 0 评论 Vue Boy.Lee

Vue 2.0 常见错误解决办法

{Error No.1: events.js:141}

当运行 npm run dev 命令时报错

{ 错误详情 }

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

Error: listen EADDRINUSE 127.0.0.1:8080
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1237:14)
at listen (net.js:1273:10)
at net.js:1382:9
at GetAddrInfoReqWrap.asyncCallback as callback
at GetAddrInfoReqWrap.onlookup as oncomplete

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm v3.7.1
npm ERR! code ELIFECYCLE
npm ERR! formsy-react@0.17.0 start: webpack-dev-server --content-base build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the formsy-react@0.17.0 start script 'webpack-dev-server --content-base build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the formsy-react package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --content-base build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs formsy-react
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls formsy-react
npm ERR! There is likely additional logging output above.`

{ 解决办法 }

npm cache clean