This post was updated 957 days ago and some of the ideas may be out of date.

配置npm使用淘宝镜像源

Source code
1 line
npm config set registry https://registry.npm.taobao.org

配置后可通过下面方式来验证是否成功

Source code
1 line
npm config get registry

注:如果想还原npm仓库地址,只需再把地址配置成npm镜像就可以了

Source code
1 line
npm config set registry https://registry.npmjs.org/