0

I tried to install some packages with npm on Centos8 but I have this issue:

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/ejs failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-01-09T16_50_40_483Z-debug.log

I changed yum.conf but like:


gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
#proxy=http://10.30.17.74:443

but I have been had the same problem, please help me.

1 Answers1

0

Try passing the proxy setting when calling npm install via command line like so:

http_proxy=http://<yourproxy>:<proxyport> https_proxy=<yourproxy>:<proxy port> npm install <package>

mottek
  • 929
  • 5
  • 12