node -- npm无法安装各种包解决方法

xiaoxiao2021-02-28  149

在使用npm安装组件包时;会遇到无法安装各种包,错误如下:

解决方案:

1: 执行一下两条命令,查看返回值是否为null;

npm config get proxy npm config get https-proxy

2:如果不为null,将这两个参数值设置为null

npm config set proxy null npm config set https-proxy null

3: 继续

npm config set registry http://registry.cnpmjs.org/
转载请注明原文地址: https://www.6miu.com/read-25071.html

最新回复(0)