修改npm镜像
由于国内网络原因,使用npm官方镜像速度感人,通过切换镜像为国内源来进行加速我们下载国外的一些依赖包。
来自官网:“这是一个完整 npmjs.org 镜像,你可以用此代替官方版本(只读),同步频率目前为 10分钟 一次以保证尽量与官方服务同步。
切换镜像源步骤:
查看当前镜像 PS E:/demo> npm config get registry
https://registry.npmjs.org/ 安装nrm PS E:/demo> npm install -g nrm 查看所有镜像源
npm ---------- https://registry.npmjs.org/
yarn --------- https://registry.yarnpkg.com/
tencent ------ https://mirrors.cloud.tencent.com/npm/
cnpm --------- https://r.cnpmjs.org/
taobao ----- https://registry.npm.t
修改npm镜像最先出现在Python成神之路。
共有 0 条评论