npm 阿里镜像

5/14/2018 npm

# npm 阿里镜像

# 设置阿里云镜像

  1. 方法一 通过config命令

    
    npm config set registry https://registry.npm.taobao.org
    npm config get registry
    
    1
    2
    3
  2. 方法2 通过安装cnpm直接使用阿里镜像(目前使用的方法)

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

cnpm install [name]--通过使用cnpm安装你需要安装的库

# npm清理缓存

npm cache clean -f
1
Last Updated: 1/22/2024, 8:56:53 AM