执行npm install命令一直失败,报错主要原因如下:
reason: getaddrinfo EAI_AGAIN registry.npmjs.org 异常分析
这两天一直在vscode终端执行安装
```java
PS D:workSoftIntelliJ IDEAworkueue-admin-template-master> npm install
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to http://registry.cnpmjs.org/axios failed, reason: getaddrinfo EAI_AGAIN registry.cnpmjs.org registry.cnpmjs.org:80
npm ERR! A complete log of this run can be found in:
npm ERR! C:Program Files
odejs
ode_cache_logs?1-04-15T05_10_34_371Z-debug.log
百度了好大都是下面的方法,主要是代理问题
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/
所以大家可以把上面语句执行一遍试一下,还有要把权限执行下面语句
npm config set strict-ssl false
如果还不行,建议大家更换vscode,node版本,我使用的是:
node-v10.12.0-x64
VSCodeUserSetup-x64-1.54