管理员权限下的控制台输入:
设置代理
npm config set proxy=http://127.0.0.1:8080 npm config set registry=http://registry.npmjs.org12 //https
npm config set https-proxy http://server:8080
代理用户名和密码
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