1、安装

yum clean all && yum makecache fast
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
yum install nodejs -y

2、配置

    1. 命令
npm config set registry https://registry.npm.taobao.org
    1. 验证命令
npm config get registry

如果返回https://registry.npm.taobao.org,说明镜像配置成功。

3、cnpm安装

    1. 安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
    1. 使用cnpm
cnpm install xxx

相关文章:

  • 2021-12-01
  • 2021-12-01
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2021-08-22
  • 2021-08-01
  • 2021-10-27
  • 2022-03-05
  • 2021-09-25
相关资源
相似解决方案