npx: getaddrinfo ENOENT raw.githubusercontent.com , unable to verify the first certificate

这篇具有很好参考价值的文章主要介绍了npx: getaddrinfo ENOENT raw.githubusercontent.com , unable to verify the first certificate。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

操作过程:

运行 npx 报错

PS xx> npx crawlee create book-crawler
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: getaddrinfo ENOENT raw.githubusercontent.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'getaddrinfo',
  hostname: 'raw.githubusercontent.com'
}
  • 尝试找到 raw.githubusercontent.com 的IP,配置 host 失败后重试,失败!!!(原因分析:IP有误或者“网络情况太差”)
  • 尝试找开源的加速工具(原理忽略),正好steam++中有,下载最新版(已改名Watt Toolkit),安装完成后打开github加速,解决了上面的错误,但是出现下面新的错误:
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket._finishInit (node:_tls_wrap:959:8)
    at ssl.onhandshakedone (node:_tls_wrap:743:12) {
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
}
  • 尝试关闭 node 证书验证, npm config set strict-ssl false , 未解决问题。

原因分析:

getaddrinfo ENOENT raw.githubusercontent.com错误是因为域名无法解析IP,所以理论上通过配置host能解决,但实际上大部分情况可能不能,只能借助别的方法。如上面使用开源加速工具等。

unable to verify the first certificate 错误则是 node 安装或者执行包时需要验证请求者的CA证书,如果请求者的CA颁发机构不在信任列表里面,则会报错。(特别是自签证书)


解决方案:

继续在 Watt Toolkit 中操作:进入网络加速界面,首先安装证书,然后就可以打开证书文件夹,查看证书路径。然后,在node扩展证书配置中加入我们的证书路径(.crt或.cer后缀的文件)

node:internal/process/promises:288 triggeruncaughtexception(err, true /* fro,npm,npx,node,npm,node.js,github
我这里是 C:\Users\Administrator\AppData\Local\Steam++\Plugins\Accelerator\SteamTools.Certificate.cer

具体配置命令如下:

$Env:NODE_EXTRA_CA_CERTS="C:\Users\Administrator\AppData\Local\Steam++\Plugins\Accelerator\SteamTools.Certificate.cer"

配置完成后,重新运行安装命令,这次可以成功安装了。

配置依据 https://playwright.dev/docs/browsers#install-behind-a-firewall-or-a-proxy

node:internal/process/promises:288 triggeruncaughtexception(err, true /* fro,npm,npx,node,npm,node.js,github文章来源地址https://www.toymoban.com/news/detail-840501.html

到了这里,关于npx: getaddrinfo ENOENT raw.githubusercontent.com , unable to verify the first certificate的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • ubuntu22.04安装ROS报错curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接

    ubuntu22.04安装ros时在执行下面命令时报错: 报错: curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接 同时执行后面命令 sudo apt update 的时候,同时报错: 解决办法: 1、在网站https://www.ipaddress.com中搜索raw.githubusercontent.com的IP地址,把找到的IP地址复制到host文件;

    2024年02月04日
    浏览(51)
  • curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443

    Mac安装Homebrew官方地址时,报错 解决办法: 可以使用国内镜像处理报错。 执行完毕后,重新打开一下终端即可

    2024年02月03日
    浏览(41)
  • 解决:The connection to the server raw.githubusercontent.com was refused - did you specify the right ho

    我在部署k8s集群安装fannel 时候 出现报错: The connection to the server raw.githubusercontent.com was refused - did you specify the right host or port? 原因:外网不可访问 解决办法: 在https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。 加入 再次运行 即可成功安装fannel 希望对各位有所帮助!

    2024年02月11日
    浏览(42)
  • 【ERROR】raw.githubusercontent.com无法连接问题

    在使用torchtext处理数据过程中,构建词表部分,运行到以下代码报错  报错截图如下:   找到包所在的文件connection.py,显示包导入出问题,查了一下资料,原以为是six模块版本不对,从这个角度出发也没能解决问题。   从网络方面着手,没能获取到文件raw.githubusercontent.com。

    2023年04月08日
    浏览(51)
  • 使用raw.gitmirror.com替换raw.githubusercontent.com以解决brew upgrade python@3.12慢的问题

    MacOS系统上,升级python3.12时,超级慢,而且最后还失败了。看了日志,发现是用curl从raw.githubusercontent.com上下载Python安装包超时了。 解决方案一:开启翻墙工具,穿越围墙 解决方案二:使用raw.gitmirror.com替换raw.githubusercontent.com 翻墙有风险,操作需谨慎,这里我采用的是方案

    2024年03月16日
    浏览(69)
  • ERROR: cannot download default sources list from: https://raw.githubusercontent.com

    ERROR: cannot download default sources list from: https://raw.githubusercontent.com 报错原因是GitHub的raw.githubusercontent.com无法连接 需要解决GitHub的raw.githubusercontent.com无法连接问题 通过IPAddress.com首页,输入raw.githubusercontent.com查询到真实IP地址 修改hosts Ubuntu, sudo vi /etc/hosts 添加以下内容保存即可

    2024年02月13日
    浏览(43)
  • 注册github账号发生错误:Unable to verify your captcha response

    注册github账号时出现Unable to verify your captcha response. Please visit https://help.github.com/articles/troubleshooting-connectivity-problems/#troubleshooting-the-captcha for troubleshooting information. 提示访问给出的网页查找错误,但其实如下操作即可 1、打开文件浏览器,在C:WindowsSystem32driversetc位置找到hos

    2024年01月22日
    浏览(39)
  • 关于picgo图床报错“unable to verify the first certificate“

    关于picgo图床报错\\\"unable to verify the first certificate\\\" 编程上的疑难杂症(一) 问题:本人picgo加github图床上传出现以下问题 \\\"message\\\": \\\"unable to verify the first certificate\\\"(无法验证第一证书) 问题分析: 图床是github图床,工具是picgo,为了可以顺利访问github用到steam++(Watt Toolkit)加速

    2024年02月11日
    浏览(47)
  • [postman] SSL Error: Unable to verify the first certificate(已解决)

    记录一次解决的由ssl证书带来的问题,以及解决历程。 问题的产生的原因是这样的,客户想给项目迁移服务器。也是按照之前服务器的配置方式,tomcat、jdk、nginx、maven等等也是用过 scp命令进行同步的,因为用scp命令能保证 文件的权限也不会变。客户这面也提供了 https的ss

    2024年02月12日
    浏览(51)
  • Mac下certificate verify failed: unable to get local issuer certificate

    出现这个问题,可以安装证书 在finder中查找 Install Certificates.command 找到后双击,或者使用其他终端打开 安装完即可

    2024年02月15日
    浏览(42)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包