1.通过config命令
npm config set registry https://registry.npm.taobao.org npm info underscore (如果上面配置正确这个命令会有字符串response)npm install -g cnpm --registry=https://registry.npm.taobao.org