npm安装插件过程:从http://registry.npmjs.org下载对应的插件包(该网站服务器位于国外,所以经常下载缓慢或出现异常)

 

阿里在国内搭建了镜像服务器:http://npm.taobao.org 

需要执行以下命令更改:

npm config set registry https://registry.npm.taobao.org --global

npm config set disturl https://npm.taobao.org/dist --global

更改完成

使用 命令  npm config get registry 查看本地镜像源

 

也可以使用下面方式

npm install cnpm -g -registry=https://registry.npm.taobao.org

部分机器出错

npm 更换阿里云镜像

解决方法:直接更新openssl 

yum update openssl -y

完成再次install cnpm即可

cnpm等同于npm命令.用法一样

相关文章:

  • 2021-12-14
  • 2022-01-07
  • 2022-12-23
  • 2022-02-07
  • 2022-02-10
  • 2021-12-22
  • 2021-08-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
相关资源
相似解决方案