一、首先查看報錯信息
我發生過兩次:、
意思大概是找不到dev ,問我是不是找serve
npm ERR! missing script: dev
npm ERR! Did you mean this?
npm ERR! serve
npm ERR! missing script: dev
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Program Files\nodejs\node_cache\_logs\2020-06-21T05_44_56_218Z-debug.log
PS E:\study\5、vue\vue-admin\vue-admin> npm run servr
npm ERR! missing script: servr
npm ERR!
npm ERR! Did you mean this?
npm ERR! serve
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Program Files\nodejs\node_cache\_logs\2020-06-21T05_45_14_570Z-debug.log
PS E:\study\5、vue\vue-admin\vue-admin> npm run server
npm ERR! missing script: server
npm ERR!
npm ERR! Did you mean this?
npm ERR! serve
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Program Files\nodejs\node_cache\_logs\2020-06-21T05_45_20_748Z-debug.log
PS E:\study\5、vue\vue-admin\vue-admin> npm run serve
解決:
查看pack.json