gpt4 book ai didi

node.js - 接收错误 : 'Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using npm

转载 作者:IT老高 更新时间:2023-10-28 21:44:59 26 4
gpt4 key购买 nike

我在 ubuntu 上使用 npm v1.0.104/node 0.6.12 - 我在尝试通过 npm 安装任何新模块时收到下面复制的错误(我之前使用 http 而不是 https 测试了 socket.io 并且我想知道如果这可能导致 npm/未签名证书出现问题)。一旦 npm 尝试解析“https://registry.npmjs.org”,就会弹出错误。 '网址。无论如何我可以忽略该错误,或​​者将证书定位/添加到受信任的商店以继续使用 npm。

任何关于需要做什么来解决问题的见解将不胜感激(我更愿意通过配置解决问题,而不是尽可能重新安装)。

Error: "Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN"

全文:

npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR! at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/main.js:252:28)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! at CleartextStream.ondata (http.js:1150:24)
npm ERR! at CleartextStream._push (tls.js:375:27)
npm ERR! at SecurePair.cycle (tls.js:734:20)
npm ERR! at EncryptedStream.write (tls.js:130:13)
npm ERR! at Socket.ondata (stream.js:38:26)
npm ERR! at Socket.emit (events.js:67:17)
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.38-13-generic
npm ERR! command "node" "/usr/bin/npm" "install" "jed"
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.0.104

最佳答案

运行以下命令有助于解决问题:

npm config set strict-ssl false

我目前无法评论它是否会导致任何其他问题。

关于node.js - 接收错误 : 'Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using npm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9626990/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com