npm run dev 报错

1.install警告:  可忽略

 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
 
2.  vue-loader  安装"vue-loader": "11.1.4",可解决

node build/dev-server.js

> Starting dev server...
ERROR Failed to compile with 2 errors14:30:11

error in ./src/App.vue

Syntax Error: Unexpected token {


@ ./src/main.js 4:0-24
@ multi ./build/dev-client ./src/main.js

error in ./src/components/HelloWorld.vue

Syntax Error: Unexpected token {


@ ./src/router/index.js 3:0-49
@ ./src/main.js
@ multi ./build/dev-client ./src/main.js

> Listening at http://localhost:8080

 

3.   端口占用 : 改配置端口 或 kill当前已占用端口的进程

events.js:141

     throw er; // Unhandled 'error' event

     ^

Error: listen EADDRINUSE :::9001

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

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

   at Server._listen2 (net.js:1250:14)

 
 
posted @ 2017-10-17 14:42  千&叶  阅读(6856)  评论(0编辑  收藏  举报