NPM
查询当前镜像
npm get registry
设置为淘宝镜像
npm config set registry https://registry.npm.taobao.org/ (旧地址)
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.npm.taobao.org/ (旧地址)
yarn config set registry https://registry.npmmirror.com/ (最新地址)
设置为官方镜像
yarn config set registry https://registry.yarnpkg.com
博客介绍了NPM和YARN的镜像操作。NPM查询当前镜像用“npm get registry”,设置淘宝镜像和官方镜像有对应命令;YARN查询当前镜像用“yarn config get registry”,设置淘宝和官方镜像也有相应命令,且给出了淘宝镜像新旧地址。
4797

被折叠的 条评论
为什么被折叠?



