为什么我无法获得https://registry.yarnpkg.com的本地发行人证书
我只是碰巧获得错误在运行
。纱Add&lt>
时无法获得本地发行者证书
昨天效果很好,但是今天它无处不在,我不记得做任何事情。
运行纱线配置设置strict-ssl false
它再次起作用,但这很可疑。
我知道我的问题似乎是重复的,但事实并非如此。我一直在搜索到处搜索,但似乎在某些情况下,例如在公司代理后面运行或进行新服务器。我不落后于任何代理。
您能帮我看看我应该进一步调查以了解真正的根本原因。
我在Macos Monterey 12.0.1
完整日志
z:~/work/littlepawcraft/mawsay[main !?]$ yarn add html2canvas --verbose
yarn add v1.22.19
verbose 0.185927225 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.npmrc".
verbose 0.186249071 Checking for configuration file "/Users/z/.npmrc".
verbose 0.186511794 Found configuration file "/Users/z/.npmrc".
verbose 0.187669087 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.188048555 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.npmrc".
verbose 0.188284222 Checking for configuration file "/Users/z/work/littlepawcraft/.npmrc".
verbose 0.188639829 Checking for configuration file "/Users/z/work/.npmrc".
verbose 0.188928153 Checking for configuration file "/Users/z/.npmrc".
verbose 0.189152548 Found configuration file "/Users/z/.npmrc".
verbose 0.189640273 Checking for configuration file "/Users/.npmrc".
verbose 0.191425842 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.yarnrc".
verbose 0.191663753 Checking for configuration file "/Users/z/.yarnrc".
verbose 0.191811016 Found configuration file "/Users/z/.yarnrc".
verbose 0.192157101 Checking for configuration file "/usr/local/etc/yarnrc".
verbose 0.192324062 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.yarnrc".
verbose 0.192446487 Checking for configuration file "/Users/z/work/littlepawcraft/.yarnrc".
verbose 0.192626013 Checking for configuration file "/Users/z/work/.yarnrc".
verbose 0.192732424 Checking for configuration file "/Users/z/.yarnrc".
verbose 0.192809809 Found configuration file "/Users/z/.yarnrc".
verbose 0.192994673 Checking for configuration file "/Users/.yarnrc".
verbose 0.196011087 current time: 2022-06-29T01:58:26.170Z
[1/4]
I just happen to get error unable to get local issuer certificate
when running yarn add <anything>
.
Yesterday it worked fine, but today it happens out of nowhere, I can't remember doing anything specifically.
After running yarn config set strict-ssl false
it becomes working again, but that is very suspicious.
I know my question seems duplicate, but it doesn't. I have been searching everywhere but they seems to be for some cases such as running behind a corporate proxy or doing a new server set up. I am not behind any proxy.
Could you please help me see where should I investigate further to know the real root cause.
I am on macOS Monterey 12.0.1
Full Log
z:~/work/littlepawcraft/mawsay[main !?]$ yarn add html2canvas --verbose
yarn add v1.22.19
verbose 0.185927225 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.npmrc".
verbose 0.186249071 Checking for configuration file "/Users/z/.npmrc".
verbose 0.186511794 Found configuration file "/Users/z/.npmrc".
verbose 0.187669087 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.188048555 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.npmrc".
verbose 0.188284222 Checking for configuration file "/Users/z/work/littlepawcraft/.npmrc".
verbose 0.188639829 Checking for configuration file "/Users/z/work/.npmrc".
verbose 0.188928153 Checking for configuration file "/Users/z/.npmrc".
verbose 0.189152548 Found configuration file "/Users/z/.npmrc".
verbose 0.189640273 Checking for configuration file "/Users/.npmrc".
verbose 0.191425842 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.yarnrc".
verbose 0.191663753 Checking for configuration file "/Users/z/.yarnrc".
verbose 0.191811016 Found configuration file "/Users/z/.yarnrc".
verbose 0.192157101 Checking for configuration file "/usr/local/etc/yarnrc".
verbose 0.192324062 Checking for configuration file "/Users/z/work/littlepawcraft/mawsay/.yarnrc".
verbose 0.192446487 Checking for configuration file "/Users/z/work/littlepawcraft/.yarnrc".
verbose 0.192626013 Checking for configuration file "/Users/z/work/.yarnrc".
verbose 0.192732424 Checking for configuration file "/Users/z/.yarnrc".
verbose 0.192809809 Found configuration file "/Users/z/.yarnrc".
verbose 0.192994673 Checking for configuration file "/Users/.yarnrc".
verbose 0.196011087 current time: 2022-06-29T01:58:26.170Z
[1/4] ???? Resolving packages...
verbose 0.464574716 Performing "GET" request to "https://registry.yarnpkg.com/html2canvas".
verbose 0.619253995 Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
error An unexpected error occurred: "https://registry.yarnpkg.com/html2canvas: unable to get local issuer certificate".
info If you think this is a bug, please open a bug report with the information provided in "/Users/z/work/littlepawcraft/mawsay/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)