npm install --registry=https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
# 配置后可通过下面方式来验证是否成功
npm config get registry
npm config set registry https://registry.npmjs.org/
原文:https://www.cnblogs.com/jockming/p/13132333.html