1.查看npm源地址设置:(默认官方镜像地址)

npm config get registry

显示https://registry.npmjs.org/

2.配置阿里巴巴镜像地址:(推荐,速度够快,同步频率快,稳定)

阿里云官方镜像站:阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区

Npm阿里云地址:
http://www.npmmirror.com

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

3.如果需要解除镜像并恢复到官方源,请执行以下命令:
 

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

更多推荐