因项目中安装模块,多次不成功,所以导致报错:
A complete log of this run can be found in: C:\Users\Anyuq\AppData\Local\npm-cache\_logs\2024-01-23T03_11_35_926Z-debug-0.lonpm cache clean --force
如图所示:

解决方案:清理缓
1. 删除node_modules文件夹
2. 清理缓存命令
npm cache clean --force
3. 重新安装一次即可
npm install /cnpm install
注:有的项目仍然无法 npm install 时,依旧报错(执行 yarn 即可)

yarn
本文描述了在项目中遇到模块安装失败的问题,通过清理node_modules文件夹、使用npmcacheclean--force命令以及必要时切换到yarn来解决问题的过程。

413

被折叠的 条评论
为什么被折叠?



