本文是解决使用npm
和yarn
时,下载安装包缓慢的问题。
解决这个问题最简单的方法就是设置安装包的仓库地址为淘宝镜像地址。
npm
设置淘宝地址
npm config set registry https://registry.npmmirror.com/
设置官方地址
npm config set registry https://registry.npmjs.org/
查看仓库地址
npm get registry
yarn
设置淘宝地址
yarn config set registry https://registry.npmmirror.com/
设置官方地址
yarn config set registry https://registry.yarnpkg.com
查看仓库地址
yarn config get registry
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。