npm安装依赖时很慢,可以设置淘宝镜像。

使用cmd在终端中做以下操作:

检测现在的镜像地址

npm config get registry

如果不是淘宝镜像地址,更换时先清空缓存

npm cache clean --force

切换新源

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

可用镜像源
淘宝镜像最新地址:npm config set registry https://registry.npmmirror.com/
官方地址:npm config set registry https://registry.npmjs.org/

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐