npm ERR! code E400
解决办法:
1、执行:
npm config get proxy
npm config get https-proxy
如果返回值不为null,继续执行:
npm config set proxy null
npm config set https-proxy null
2、执行:
npm config set registry http://registry.cnpmjs.org/
3、直接编辑c盘下的.npmrc文件,将registry的值修改为:
`registry = http:``//registry.cnpmjs.org`
ps:建议直接执行第2种或第三种方法应该就可以了
遇到这个问题,就来回切换下,一般就能解决了。
taobao代理:https://registry.npm.taobao.org/