设置代理
npm config set proxy http://username:password@server:port
npm config set https-proxy http://username:password@server:port
删除代理
npm config delete proxy
npm config delete https-proxy
设置仓库
npm config set registry=http://registry.npmjs.org
或
npm config set registry=https://registry.npm.taobao.org
或
npm install --production --registry https://registry.npm.taobao.org
或
npm install -g xxxxxxx --registry https://registry.npm.taobao.org
或
npm install xxxxxxx --registry https://registry.npm.taobao.org