简体   繁体   English

npm安装失败EPROTO提取请求失败

[英]npm install failed EPROTO fetch request failed

I get fetch failed error when I try to install a package from npm. 当我尝试从npm安装软件包时,出现提取失败错误。 I set the config of the npm: - set strict-ssl to false - set registry with https://registry.npmjs.org/ - set the proxy and https-proxy 我设置了npm的配置:-将strict-ssl设置为false-使用https://registry.npmjs.org/设置注册表-设置代理和https-proxy

When I search a package, the get method to the registry worked fine however when I try to install, I got an error 当我搜索软件包时,注册表的get方法工作正常,但是当我尝试安装时,出现错误

I got this error after I upgrade my node with the last version of Node 8.9.1 with npm 5.5.1. 在使用npm 5.5.1的最新版本的Node 8.9.1升级节点后,出现了此错误。

I tried many things to fix it: - deleted the content and reconfigured my .npmrc settings with proxy, strict-ssl - downgrade to my latest version which was the node 4 version however it doesn't work .... 我尝试了许多方法来修复它:-删除了内容,并使用proxy,strict-ssl重新配置了.npmrc设置-降级到了我的最新版本,即节点4版本,但是它不起作用...。

This is the error that I got: 这是我得到的错误:

info it worked if it ends with ok 信息,如果一切正常就可以了
verbose cli [ 'C:\\Applications\\Nodejs\\node.exe', 详细cli ['C:\\ Applications \\ Nodejs \\ node.exe',
verbose cli 详细的cli
'C:\\Users\\xxxxxxxxx\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 'C:\\ Users \\ xxxxxxxxx \\ AppData \\ Roaming \\ npm \\ node_modules \\ npm \\ bin \\ npm-cli.js',
verbose cli 'install', 详细的cli'install',
verbose cli 'create-react-class', 详细的cli'create-react-class',
verbose cli '--save', 详细cli'--save',
verbose cli '--verbose' ] 详细cli'--verbose']
info using npm@5.5.1 使用npm@5.5.1的信息
info using node@v4.7.0 使用node@v4.7.0的信息
verbose npm-session 3edca0dd78623f79 详细的npm-session 3edca0dd78623f79
silly install loadCurrentTree 愚蠢的安装loadCurrentTree
silly install readLocalPackageData 愚蠢的安装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: https://registry.npmjs.org/create-react-class的 create-react-class @ latest请求的傻fetchPackageMetaData错误失败,原因:编写EPROTO 101057795:error:140770FC:SSL例程:SSL23_GET_SERVER_HELLO:未知协议: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: 详细堆栈FetchError:请求https://registry.npmjs.org/create-react-class失败,原因:编写EPROTO 101057795:错误:140770FC:SSL例程:SSL23_GET_SERVER_HELLO:未知协议:openssl \\ ssl \\ s23_clnt.c:794 :
verbose stack 详细堆栈
verbose stack at ClientRequest. 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) (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) embedOne的详细堆栈(events.js:77:13)
verbose stack at ClientRequest.emit (events.js:169:7) ClientRequest.emit上的详细堆栈(events.js:169:7)
verbose stack at onerror 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) (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) 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\\ 详细的cwd D:\\ Users \\ xxxxxxxxx \\ Documents \\ PycharmWorkspace \\
verbose Windows_NT 6.1.7601 详细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" 详细的argv“ C:\\ Applications \\ Nodejs \\ node.exe”“ C:\\ Users \\ xxxxxxxxx \\ AppData \\ Roaming \\ npm \\ node_modules \\ npm \\ bin \\ npm-cli.js”“安装”“创建反应类” “-保存”“-详细”
verbose node v4.7.0 详细节点v4.7.0
verbose npm v5.5.1 详细npm v5.5.1
error code EPROTO 错误代码EPROTO
error errno EPROTO 错误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: https://registry.npmjs.org/create-react-class的错误请求失败,原因:编写EPROTO 101057795:错误:140770FC:SSL例程:SSL23_GET_SERVER_HELLO:未知协议:openssl \\ ssl \\ s23_clnt.c:794:
verbose exit [ 1, true ] 详细出口[1,正确]

我通过按照这篇文章如何从Windows完全删除node.js和npm从计算机上完全删除node.js和npm来解决此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM