npm run dev 報錯

1.install警告:  可忽略vue

 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.jsnode

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

error in ./src/App.vueui

Syntax Error: Unexpected token {component


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

error in ./src/components/HelloWorld.vuerouter

Syntax Error: Unexpected token {server


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

> 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)

相關文章
相關標籤/搜索