首页IT科技npm cannot find module time(如何解决 npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)报错问题)

npm cannot find module time(如何解决 npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)报错问题)

时间2025-05-03 12:04:23分类IT科技浏览3437
导读:1、问题描述:...

1          、问题描述:

在vue项目中          ,当我们在终端使用指令:npm install 下载 node_modules (节点_模块) 时出现报错的情况          。

node_modules是安装node后用来存放用包管理工具下载安装的包的文件夹               。比如webpack               、gulp     、grunt这些工具     。

主要是这个原因:npm ERR! Cannot read properties of null (reading pickAlgorithm)

翻译:npm错误!无法读取null的属性(读取“pickAlgorithm          ”) 

2          、解决方案: 

在终端运行命令:npm cache clear --force(npm缓存清除--强制)

若是上条命令不行               ,则 npm cache clean --force   (npm缓存清理--强制)

一般来说运行完第一条命令     ,安装就成功了          。但经过测试有些人的电脑上要使用缓存清理才行               。

大家多多尝试     。我自己用的 npm cache clear --force 效果很明显     ,一下就成功了     。

然后再次执行命令进行安装:npm install(npm i)

再启动项目即可:npm run dev

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
boost asio buffer(muduo 与 boost asio 吞吐量对比) vs2010和sql2008(VS2010、SQL Server 2008和SQL Server 2012安装详解)