【发布时间】:2021-02-03 11:29:38
【问题描述】:
当我尝试安装 express 或任何 npm 包时出现此类错误(无代理)(节点 -v 10.14.2)(npm -v 6.4.1)
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/express/express failed, reason: connect ETIMEDOUT 104.16.21.35:80
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ankit\AppData\Roaming\npm-cache\_logs\2020-10-20T15_26_19_314Z-debug.log
请帮助我,提前谢谢你。
【问题讨论】:
-
你能对这个 url registry.npmjs.org/express/express 进行 GET 调用吗?最简单的检查方法是在浏览器中打开它。
-
确保您的 Internet 连接正确,因此会超时