在终端输入 npm run dev 时报错 npm ERR! code ELIFECYCLE

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! code@1.0.0 script: `babel js -d scripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the code@1.0.0 script 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\rookieding\AppData\Roaming\npm-cache\_logs\2021-01-10T16_24_19_912Z-debug.log

错误原因在于由于文件 node_modules 太大,在项目上传时有些人会删掉

导致我们下载的项目中缺少这个文件

解决方法:在命令行中先进入文件所在路径

然后输入命令

npm i

在启动时就成功了

相关文章

显卡天梯图2024最新版,显卡是电脑进行图形处理的重要设备,...
初始化电脑时出现问题怎么办,可以使用win系统的安装介质,连...
todesk远程开机怎么设置,两台电脑要在同一局域网内,然后需...
油猴谷歌插件怎么安装,可以通过谷歌应用商店进行安装,需要...
虚拟内存这个名词想必很多人都听说过,我们在使用电脑的时候...