npm,yarn如何查看源和换源
npm,yarn如何查看源和换源
摘要
本文介绍了如何在npm和yarn中查看及更换默认的包管理器镜像源,包括使用npm config get registry
和yarn config get registry
查看当前源,以及如何通过npm config set registry
和yarn config set registry
将源设置为淘宝镜像(如https://registry.npmmirror.com/)。
正文
npm, yarn查看源和换源:
npm config get registry // 查看npm当前镜像源
npm config set registry https://regi