【node】 cnpm|npm查看、修改镜像地址操作 换源操作

【node】 cnpm|npm查看、修改镜像地址操作 换源操作

安装完node后

npm

1.查看当前npm信息

npm -v

2.查看当前的镜像源

npm config get registry

3.如果需要淘宝镜像源,修改当前的镜像源为淘宝镜像源

registry https://registry.npm.taobao.org弃用

npm config set registry https://registry.npmmirror.com

4.如果需要默认的node官方镜像源,修改为官方镜像

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

5.修改完后再次通过命令查看

npm config get registry

1.查看当前cnpm信息

cnpm-v

2.查看当前的镜像源

cnpm config get registry

3.如果需要淘宝镜像源,修改当前的镜像源为淘宝镜像源

registry https://registry.npm.taobao.org弃用

cnpm config set registry https://registry.npmmirror.com

4.如果需要默认的node官方镜像源,修改为官方镜像

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

5.修改完后再次通过命令查看

cnpm config get registry

猜你喜欢

转载自blog.csdn.net/qq_47888212/article/details/142549353