1、修改本地配置:

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

2、查看本地源:

npm config get registry

3、可用源:

# 官方
https://registry.npmjs.org

# 淘宝
https://registry.npmmirror.com

4、单次使用,不修改配置:

npm --registry https://registry.npmmirror.com install