NPM
查询当前镜像
npm get registry
设置为阿里云镜像
npm config set registry https://registry.npmmirror.com
设置回默认的官方镜像
npm config set registry https://registry.npmjs.org/
YARN
查询当前镜像
yarn config get registry
设置为阿里云镜像
yarn config set registry https://registry.npmmirror.com
设置回默认的官方镜像
yarn config set registry https://registry.yarnpkg.com
设置成功都有类似下面的输出
yarn config v1.16.0
success Set "registry" to "https://registry.npmmirror.com".
Done in 0.05s.
安装CNPM
npm install -g cnpm --registry=https://registry.npmmirror.com
© 版权声明
站内部分资源由网友投稿或收集于网络,若侵犯了您的合法权益,请联系我们删除
THE END
暂无评论内容