npm 设置镜像

npm 镜像 About 460 words

查看当前镜像

npm config get registry

也可以使用npm config lsmetrics-registry显示的就是镜像的地址。

npm config ls

可用镜像

淘宝 npm 镜像

cnpmjs 镜像

临时使用

npm安装时指定registry,表示此次安装使用该镜像地址。

示例为安装Angular脚手架,临时使用淘宝npm镜像。

npm --registry https://registry.npm.taobao.org install -g @angular/cli

长久配置

配置成功后可再使用查看镜像命令,查询是否配置成功。

npm config set registry https://registry.npm.taobao.org
Views: 2,590 · Posted: 2021-06-13

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh