美文网首页
淘宝镜像

淘宝镜像

作者: BigDipper | 来源:发表于2020-04-16 12:15 被阅读0次

本文是解决使用npmyarn时,下载安装包缓慢的问题。
解决这个问题最简单的方法就是设置安装包的仓库地址为淘宝镜像地址。

npm

设置淘宝地址

npm config set registry https://registry.npm.taobao.org/

设置官方地址

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

查看仓库地址

npm get registry 

yarn

设置淘宝地址

yarn config set registry https://registry.npm.taobao.org/

设置官方地址

yarn config set registry https://registry.yarnpkg.com

查看仓库地址

yarn config get registry

解决yarn安装node-sass失败的问题

配置node-sass 的二进制包镜像地址

yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

相关文章

网友评论

      本文标题:淘宝镜像

      本文链接:https://www.haomeiwen.com/subject/vwcrvhtx.html