npm run dev服务起不来报错Error: listen EACCES 0.0.0.0:8080

λ npm run dev

> my-first-vue-project@1.0.0 dev E:\my-first-vue-project
> node build/dev-server.js

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

Error: listen EACCES 0.0.0.0:8080
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at Server._listen2 (net.js:1221:19)
    at listen (net.js:1270:10)
    at Server.listen (net.js:1366:5)
    at EventEmitter.listen (E:\my-first-vue-project\node_modules\.npminstall\express\4.14.0\express\lib\application.js:617:24)
    at Object.<anonymous> (E:\my-first-vue-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! Windows_NT 6.1.7601
npm ERR! argv "E:\\nodejs\\node.exe" "E:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! my-first-vue-project@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-first-vue-project@1.0.0 dev script 'node build/dev-server.js'.
npm ERR! This is most likely a problem with the my-first-vue-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-first-vue-project
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls my-first-vue-project
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\my-first-vue-project\npm-debug.log
阅读 24.5k
9 个回答

你的8080端口是否被占用,可以关闭该端口运行的程序再试

端口号已被占用,或一个端口比如3000试一下

如果端口被占用了,可以执行 npm run dev --port 8001 端口号设置为8081

你这问题解决了么。。我也遇到一样的问题

新手上路,请多包涵

我也遇到了这个问题,是自己忘了安装依赖
cnpm install 即可

你换成localhost:8080

新手上路,请多包涵

clipboard.png

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题