在npm安装时获取错误 - 请求https://registry.npmjs.org/axios失败

时间:2017-10-19 10:40:58

标签: node.js npm-install

我正在尝试学习socket.io和React,因此我找到了一个项目here

需要注意的是,我只是举一个链接的例子。我试图在github上找到更多这样的项目,我得到的错误如下所述。因此,此错误并非特定于此链接,而是与npm或我的系统相关的内容。

当我试图运行时

  

npm install

显示此错误

npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/axios failed, reason: write EPROTO 139829807306560:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:797:
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/abhi/.npm/_logs/2017-10-19T10_20_30_486Z-debug.log
abhi@abhi-HP-Pavilion-15-Notebook-PC:~/Desktop/react-chat$ npm config set strict-ssl falseabhi@abhi-HP-Pavilion-15-Notebook-PC:~/Desktop/react-chat$ npm install
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/axios failed, reason: write EPROTO 140309084555072:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:797:
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/abhi/.npm/_logs/2017-10-19T10_22_15_980Z-debug.log
abhi@abhi-HP-Pavilion-15-Notebook-PC:~/Desktop/react-chat$ npm install
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/axios failed, reason: write EPROTO 139873739618112:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:797:
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/abhi/.npm/_logs/2017-10-19T10_24_36_169Z-debug.log

一些输出

npm -v
5.0.3

node -v
v8.1.0

> npm config list

; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.0.3 node/v8.1.0 linux x64"

; userconfig /home/abhi/.npmrc
strict-ssl = false

; node bin location = /home/abhi/.nvm/versions/node/v8.1.0/bin/node
; cwd = /home/abhi/Desktop/react-chat
; HOME = /home/abhi
; "npm config ls -l" to show all defaults.

env | grep -i proxy

http_proxy=http://172.16.1.12:3128/
https_proxy=https://172.16.1.12:3128/

0 个答案:

没有答案