npm淘宝镜像 

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

npm华为镜像

npm config set registry https://mirrors.huaweicloud.com/repository/npm/

全局安装cnpm并设置淘宝镜像

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

还原默认镜像

方法一:

npm config delete registry

方法二:

npm config set registry https://registry.npmjs.org

查看当前npm镜像

npm config get registry

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐