怪物奇妙物语

宇宙无敌超级美少男的怪物奇妙物语

首页 新随笔 联系 管理
  819 随笔 :: 0 文章 :: 2 评论 :: 16万 阅读

npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

问题描述

拿到一个项目,使用  npm install 安装依赖包,结果却出现了下面的报错:
npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mac/.npm/_logs/2022-07-13T14_36_26_298Z-debug-0.log

image-20220803213503988

解决方法

解决方法如下:

首先先清理一下缓存:npm cache clean --force   

接着就是,再次使用npm install进行安装,

如果不行,就使用 yarn!

如果没有安装 yarn 的,可以先查看 yarn 版本,没安装就先安装。

最后使用 yarn 代替 npm 运行这个项目就好了。

如图,最后 成功运行!

【补充,npm 和 yarn 不能一起使用,但是在最开始 start、restart 项目时没有关系。】

原文地址 blog.csdn.net

posted on   超级无敌美少男战士  阅读(2333)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 推荐几款开源且免费的 .NET MAUI 组件库
· 实操Deepseek接入个人知识库
· 易语言 —— 开山篇
· Trae初体验
点击右上角即可分享
微信分享提示