【问题标题】:npm ERR! on npm installnpm 错误!在 npm 安装
【发布时间】:2023-03-30 05:19:01
【问题描述】:
C:\Users\Mayur Saner\pmrm>npm install
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npmjs.org/@fortawesome%2ffontawesome-free failed, reason: getaddrinfo ENOTFOUND proxy.company.com
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\Mayur Saner\AppData\Roaming\npm-cache\_logs\2019-12-18T09_56_28_976Z-debug-log

从上周开始在 npm install 上出现此错误,在此之前它工作正常。现在可能发生了什么?

【问题讨论】:

  • 检查你的网络连接~
  • 是的,一切都很好,也尝试了代理
  • 似乎您在网络上使用代理。验证它
  • @MayurSaner - 请阅读you should not post code as an image 的原因 - 谢谢!

标签: angular npm visual-studio-code npm-install


【解决方案1】:

问题似乎与代理或网络配置有关; 尝试使用以下方式清除代理:

npm config delete http-proxy
npm config delete https-proxy

npm config rm proxy
npm config rm https-proxy

set HTTP_PROXY=null
set HTTPS_PROXY=null

【讨论】:

  • 现在得到这个:npm ERR!无法读取 null 的属性“startsWith”
猜你喜欢
  • 2014-11-21
  • 2012-02-09
  • 2022-01-10
  • 2016-04-03
  • 1970-01-01
  • 2019-08-20
  • 2015-10-24
  • 2014-07-27
相关资源
最近更新 更多