问题
C:\Users\JH\Desktop\RuoYi-Vue\ruoyi-ui>npm run dev
> ruoyi@3.2.1 dev C:\Users\JH\Desktop\RuoYi-Vue\ruoyi-ui
> vue-cli-service serve
'vue-cli-service' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ruoyi@3.2.1 dev: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ruoyi@3.2.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\MyData\MySoftware\nodejs\node_cache\_logs\2020-12-08T06_50_30_980Z-debug.log
解决方案
- 安装过的淘宝镜像用这个
cnpm install
- 没有安装过淘宝镜像的用这个
npm install
最后执行
npm run dev