npm install报错npm ERR! code EPROTO npm ERR! errno EPROTO

执行npm install报错:

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

解决方法:

npm config set proxy http://主机用户名:密码@XXX.XXX.XXX.XXX(代理地址):1080(代理端口号)
再执行npm install,成功

你可能感兴趣的:(npm install报错npm ERR! code EPROTO npm ERR! errno EPROTO)