共计 618 个字符,预计需要花费 2 分钟才能阅读完成。
【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
原文地址: 【node】cnpm|npm 查看、修改镜像地址操作 换源操作
正文完