4
votes

I get fetch failed error when I try to install a package from 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

When I search a package, the get method to the registry worked fine however when I try to install, I got an error

I got this error after I upgrade my node with the last version of Node 8.9.1 with npm 5.5.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 ....

This is the error that I got:

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 [email protected]
info using [email protected]
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 ]

1
Possible duplicate of NPM unknown protocolVeve

1 Answers

-8
votes

I fix the problem by completely removing node.js and npm from my computer following this post How to completely remove node.js from Windows