发布于 4年前

'vue-cli-service' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

在终端输入npm run serve的时候,提示错误信息

> iview-admin-pro-template@2.0.0 serve C:\....\app
> vue-cli-service serve --open

'vue-cli-service' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iview-admin-pro-template@2.0.0 serve: `vue-cli-service serve --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iview-admin-pro-template@2.0.0 serve 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:\Users\123\AppData\Roaming\npm-cache\_logs\2020-08-20T01_52_49_464Z-debug.log

因为没有node_modules

运行命令 npm install 即可

©2020 edoou.com   京ICP备16001874号-3