gpt4 book ai didi

node.js - npm 安装失败 EPROTO 获取请求失败

转载 作者:行者123 更新时间:2023-12-02 20:32:09 34 4
gpt4 key购买 nike

当我尝试从 npm 安装软件包时,出现获取失败错误。我设置了 npm 的配置: - 将 strict-ssl 设置为 false - 使用 https://registry.npmjs.org/ 设置注册表 - 设置代理和 https-proxy

当我搜索软件包时,注册表的获取方法工作正常,但是当我尝试安装时,出现错误

使用 npm 5.5.1 升级最新版本的 Node 8.9.1 Node 后,出现此错误。

我尝试了很多方法来解决这个问题: - 删除了内容并使用代理、严格 ssl 重新配置了我的 .npmrc 设置 - 降级到我的最新版本,即 Node 4 版本,但它不起作用......

这是我得到的错误:

info it worked if it ends with ok
verbose cli [ 'C:\Applications\Nodejs\node.exe',
verbose cli
'C:\Users\xxxxxxxxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
verbose cli 'install',
verbose cli 'create-react-class',
verbose cli '--save',
verbose cli '--verbose' ]
info using npm@5.5.1
info using node@v4.7.0
verbose npm-session 3edca0dd78623f79
silly install loadCurrentTree
silly install readLocalPackageData
silly fetchPackageMetaData error for create-react-class@latest request to https://registry.npmjs.org/create-react-class failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
verbose type system
verbose stack FetchError: request to https://registry.npmjs.org/create-react-class failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
verbose stack
verbose stack at ClientRequest. (C:\Users\xxxxxxxxx\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:68:14)
verbose stack at emitOne (events.js:77:13)
verbose stack at ClientRequest.emit (events.js:169:7)
verbose stack at onerror
(C:\Users\xxxxxxxxx\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-base\index.js:106:9)
verbose stack at callbackError (C:\Users\xxxxxxxxx\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-base\index.js:126:5)
verbose cwd D:\Users\xxxxxxxxx\Documents\PycharmWorkspace\
verbose Windows_NT 6.1.7601
verbose argv "C:\Applications\Nodejs\node.exe" "C:\Users\xxxxxxxxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "create-react-class" "--save" "--verbose"
verbose node v4.7.0
verbose npm v5.5.1
error code EPROTO
error errno EPROTO
error request to https://registry.npmjs.org/create-react-class failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
verbose exit [ 1, true ]

最佳答案

我通过在这篇文章 How to completely remove node.js from Windows 后从我的计算机中完全删除 node.js 和 npm 来解决这个问题

关于node.js - npm 安装失败 EPROTO 获取请求失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47206374/

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