首页 > 其他分享 >解决npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)报错问题

解决npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)报错问题

时间:2022-11-23 22:37:51浏览次数:47  
标签:npm force cache 指令 报错 clean reading

解决方法:
在终端中运行命令:
npm cache clear --force

然后重新运行 npm i 命令,再次安装
安装完成,没有出现报错
npm run serve 运行项目,项目可以正常启动了。

 

 

安装vue CLI失败后,百度得知在终端执行命令:npm clean cache -force 后大部分人都解决了,但我试过后还是无效。

一种解决方案是尝试重新安装node。

执行指令npm clean cache -force 失效的一个可能的原因是,终端的一些指令是不能随便执行的,需要管理员权限。

执行指令清空,清空的就是一个内部的文件夹,在user/administrator/AppData/Roaming/npm cache里,把npm cache这个文件夹删
掉,然后再去执行npm clean cache -force 这个命令,就可以了。

标签:npm,force,cache,指令,报错,clean,reading
From: https://www.cnblogs.com/zhyp/p/16920380.html

相关文章