0
votes

I want to install nodemon. But when try to install, get this error:

sudo npm install -g nodemon

npm ERR! code EPROTO

npm ERR! errno EPROTO

npm ERR! request to registry.npmjs.org/nodemon failed, reason: write EPROTO140097810798400:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:

npm ERR!

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2018-09-18T06_36_29_786Z-debug.log

Setting a proxy in this way does not help

$ npm config set proxy http://...
$ npm config set https-proxy http://...
1
Possible duplicate of NPM unknown protocolVeve
@Veve And what's this for? the answer was not given to that question.xefiqz
@xefiqz There is an answer to the linked question. Have you tried it ? Also don't use sudo npm (medium.com/@ExplosionPills/…)Seblor

1 Answers

1
votes

I think we are missing some informations here, but some people reported the same issue you are having, and it seems the answer is to set the NPM registry URL to the non-SSL one. You can to so with this command :

npm config set registry http://registry.npmjs.org/

References :
https://github.com/npm/npm/issues/2050#issuecomment-3696752
https://github.com/npm/npm/issues/8976#issuecomment-123748215