npm config set registry https://registry.npm.taobao.org npm info underscore (如果上面配置正确这个命令会有字符串response)
npm --registry https://registry.npm.taobao.org info underscore
/.npmrc文件,在文件后面加如下代码 -- 推荐使用,将配置写死,下次直接用
registry = https://registry.npm.taobao.org
原文:http://www.cnblogs.com/happyzwt/p/6194705.html