$ npm install -g cnpm --registry=https://registry.npm.taobao.org

npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0

 

找了许多方法都不行,最后只能降低版本

npm install npm@4.6.1 -g