← 返回文章

Vue-bug

Vue 中遇到的问题,以及解决方法

启动 vue 服务时出现的问题。

>npm run serve

> chain@0.1.0 serve D:\资料整理\3. 项目-整理\教链\教链系统源码
> vue-cli-service serve

'vue-cli-service' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chain@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chain@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xd04\AppData\Roaming\npm-cache\_logs\2021-02-24T01_28_31_092Z-debug.log

解决方法: 删除 node_modules, 重新 npm install 安装