您的位置:首页 > 产品设计 > 产品经理

npm更换国内镜像

2017-12-28 19:10 239 查看
查看npm的配置

更换镜像三种方式

查看npm的配置

npm config list

metrics-registry = “https://registry.npmjs.org/

npm config get globalconfig

/usr/local/etc/npmrc

npm config ls -l

; cli configs

long = true

metrics-registry = “https://registry.npmjs.org/

scope = “”

user-agent = “npm/5.0.3 node/v8.1.2 darwin x64”

registry = “https://registry.npmjs.org/

更换镜像(三种方式)

1.通过config命令

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

npm config set disturl https://npm.taobao.org/dist –global

2.命令行指定

npm –registry https://registry.npm.taobao.org info underscore

3.编辑 ~/.npmrc 加入下面内容

registry = https://registry.npm.taobao.org
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: