192:Pipeline-Node zhuruhong$ npm config list ; cli configs metrics-registry = "https://registry.npmjs.org/" scope = "" user-agent = "npm/6.4.1 node/v11.1.0 darwin x64"
; builtin config undefined prefix = "/usr/local"
; node bin location = /usr/local/Cellar/node/11.1.0/bin/node ; cwd = /Users/zhuruhong/Desktop/pig/Pipeline-Node ; HOME = /Users/zhuruhong ; "npm config ls -l" to show all defaults.
192:Pipeline-Node zhuruhong$
修改registry地址,比如修改为淘宝镜像源
1
npm set registry https://registry.npm.taobao.org/
删除registry地址
1
npm config rm registry
nrm是专门用来管理和快速切换私人配置的registry【建议全局安装】
1 2 3 4 5 6
192:Pipeline-Node zhuruhong$ npm install nrm -g --save npm WARN deprecated coffee-script@1.7.1: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) /usr/local/bin/nrm -> /usr/local/lib/node_modules/nrm/cli.js + nrm@1.2.1 added 489 packages from 840 contributors in 26.567s 192:Pipeline-Node zhuruhong$