npm run dev 出现错误

来源:2-4 项目目录介绍及图标字体、公共样式等资源准备

guozuji

2017-08-08

 我下载的第二章的,npm run dev 出现如下错误。是端口问题吗  

emideMacBook-Air:vue-music-chapter2 emizheng$ npm run dev


> vue-music@1.0.0 dev /Users/emizheng/Desktop/vue-music-chapter2

> node build/dev-server.js


> Starting dev server...

events.js:182

      throw er; // Unhandled 'error' event

      ^


Error: listen EADDRINUSE :::8080

    at Object.exports._errnoException (util.js:1024:11)

    at exports._exceptionWithHostPort (util.js:1047:20)

    at Server.setupListenHandle [as _listen2] (net.js:1319:14)

    at listenInCluster (net.js:1367:12)

    at Server.listen (net.js:1467:7)

    at Function.listen (/Users/emizheng/Desktop/vue-music-chapter2/node_modules/_express@4.15.4@express/lib/application.js:618:24)

    at Object.<anonymous> (/Users/emizheng/Desktop/vue-music-chapter2/build/dev-server.js:82:18)

    at Module._compile (module.js:569:30)

    at Object.Module._extensions..js (module.js:580:10)

    at Module.load (module.js:503:32)

    at tryModuleLoad (module.js:466:12)

    at Function.Module._load (module.js:458:3)

    at Function.Module.runMain (module.js:605:10)

    at startup (bootstrap_node.js:158:16)

    at bootstrap_node.js:575:3

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! vue-music@1.0.0 dev: `node build/dev-server.js`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the vue-music@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:


写回答

1回答

ustbhuangyi

2017-08-09

需要先执行 npm install 安装依赖再运行

0
1
guozuji
非常感谢!
2017-08-09
共1条回复

Vue2.0高级应用教学实战,开发企业级移动端音乐Web App

Vue.js高级知识应用大集合,实战企业级APP,教你搞定组件化开发。

5432 学习 · 3804 问题

查看课程

相似问题