【问题解决】npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! newbee@0.1.0 serve: `vue-cli-service serv

Plan

在本地运行ids项目.

Do

执行npm run serve,报如下错误

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! newbee@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the newbee@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

直接百度之后找到解决方案:Vue错误跳坑
在这里插入图片描述
跟着文章中提示的解决方法,运行后报如下错误:

在这里插入图片描述
在这里插入图片描述
百度解决说要改代码,所以就请教了导师,导师说我操作有误,先把项目给回滚了,并进到项目中用命令行删除了node_modules文件夹
在这里插入图片描述
之后,cmd 执行npm install,发现执行到loadIdealTree:loadAllDepsIntoIdealTree: sill install loadIdealTree界面一直不动,百度答案为
在这里插入图片描述
这和第一次的解决方法没啥区别,所以又请教了导师,导师去idea中执行了npm install,发现居然可以顺畅的执行下去了。。。
在这里插入图片描述
接着去vscode再次运行代码,接着报错

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ids@1.0.0 serve: `vue-cli-service serve --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ids@1.0.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\UIDQ5637\AppData\Roaming\npm-cache\_logs\2022-11-03T03_20_04_771Z-debug.log

又执行:npm install vue-cli-service,接着报错

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/vue-cli-service - Not found
npm ERR! 404
npm ERR! 404  'vue-cli-service@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\UIDQ5637\AppData\Roaming\npm-cache\_logs\2022-11-03T03_21_10_296Z-debug.log

最后执行 npm install --save,就可以成功运行了
在这里插入图片描述

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值