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

配置npm使用淘宝镜像源

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

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

npm config get registry

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

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