【发布时间】:2018-04-22 17:08:35
【问题描述】:
当我尝试从 npm 安装软件包时,我收到了 fetch failed 错误。我设置了 npm 的配置: - 将严格 SSL 设置为 false - 使用https://registry.npmjs.org/ 设置注册表 - 设置代理和https-proxy
当我搜索一个包时,注册表的 get 方法工作正常,但是当我尝试安装时,我得到一个错误
在我使用最新版本的 Node 8.9.1 和 npm 5.5.1 升级我的节点后,我收到了这个错误。
我尝试了很多方法来修复它: - 删除内容并使用代理、strict-ssl 重新配置我的 .npmrc 设置 - 降级到我的最新版本,即 node 4 版本,但它不起作用....
这是我得到的错误:
如果它以 ok 结尾,它会起作用
详细的 cli ['C:\Applications\Nodejs\node.exe',
详细的 cli
'C:\Users\xxxxxxxxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
详细的 cli '安装',
详细的 cli 'create-react-class',
详细的 cli '--save',
详细 cli '--verbose' ]
使用 npm@5.5.1 的信息
使用 node@v4.7.0 的信息
详细的 npm-session 3edca0dd78623f79
傻安装 loadCurrentTree
傻安装 readLocalPackageData
对 https://registry.npmjs.org/create-react-class 的 create-react-class@latest 请求的愚蠢 fetchPackageMetaData 错误失败,原因:写入 EPROTO 101057795:error:140770FC:SSL 例程:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
详细类型系统
详细堆栈 FetchError:对 https://registry.npmjs.org/create-react-class 的请求失败,原因:写入 EPROTO 101057795:错误:140770FC:SSL 例程:SSL23_GET_SERVER_HELLO:未知协议:openssl\ssl\s23_clnt.c:794:
详细堆栈
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)
emitOne 的详细堆栈 (events.js:77:13)
ClientRequest.emit 的详细堆栈 (events.js:169:7)
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)
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)
详细 cwd D:\Users\xxxxxxxxx\Documents\PycharmWorkspace\
详细的 Windows_NT 6.1.7601
详细 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"
详细节点 v4.7.0
详细的 npm v5.5.1
错误代码 EPROTO
错误 errno EPROTO
对https://registry.npmjs.org/create-react-class 的错误请求失败,原因:写 EPROTO 101057795:error:140770FC:SSL 例程:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
详细退出 [1, true]
【问题讨论】:
-
NPM unknown protocol的可能重复
标签: node.js npm npm-install