在这里插入图片描述
报错内容如下:
‘vue-cli-service’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mas-creator-admin@0.1.0 serve: vue-cli-service serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mas-creator-admin@0.1.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\pingfan_yu\AppData\Roaming\npm-cache_logs\2024-10-13T11_49_06_100Z-debug.log

E:\BaiduNetdiskDownload\springbooti5zlnm7v\src\main\resources\admin\admin>Remove-item -Force -Recurse node_modules
‘Remove-item’ 不是内部或外部命令,也不是可运行的程序或批处理文件。

先安装一下rimraf

npm install rimraf -g

在这里插入图片描述
然后删除node_modules

rimraf node_modules

然后在用淘宝镜像重新安装

npm install --registry=https://registry.npm.taobao.org

在这里插入图片描述在这里插入图片描述最后重新运行项目就能出来

npm run serve

在这里插入图片描述

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐