vue 启动项目报错 npm run serve

安装了一个vue-element admin,习惯性输入,然后报错。

npm run serve
npm ERR! missing script: serve

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\nodejs\node_cache\_logs\2020-04-13T02_07_55_822Z-debug.log

原来是package.json里边没有配置serve,打开package.json查看,原来是用dev,
npm run dev

"scripts": {
    "dev": "vue-cli-service serve",

That’s all!

你可能感兴趣的:(Vue)