安装node

npm

1.查看当前npm信息

npm -v

2.查看当前的镜像源

npm config get registry

3.修改当前的镜像源为淘宝镜像源

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

修改官方镜像

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

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

cnpm

1.查看当前cnpm信息

cnpm-v

2.查看当前的镜像源

cnpm config get registry

3.修改当前的镜像源为淘宝镜像源

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

改为官方镜像

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

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

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注