验证码: 看不清楚,换一张 查询 注册会员,免验证
  • {{ basic.site_slogan }}
  • 打开微信扫一扫,
    您还可以在这里找到我们哟

    关注我们

npm ERR!Cannot read properties of null(reading 'pickAlgorithm')报错如何解决

阅读:1067 来源:乙速云 作者:代码code

npm ERR!Cannot read properties of null(reading 'pickAlgorithm')报错如何解决

1、问题描述:

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

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

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

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

npm ERR!Cannot read properties of null(reading 'pickAlgorithm')报错如何解决

2、解决方案: 

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

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

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

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

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

再启动项目即可:npm run dev

npm ERR!Cannot read properties of null(reading 'pickAlgorithm')报错如何解决

分享到:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: hlamps#outlook.com (#换成@)。
相关文章
{{ v.title }}
{{ v.description||(cleanHtml(v.content)).substr(0,100)+'···' }}
你可能感兴趣
推荐阅读 更多>