在使用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/