npm install package: npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID


(Manz) #1

Hi all,

I trying to install new project using npm thru express-generator and npm said an error:


npm WARN registry Unexpected warning for https ://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https ://registry.npmjs.org/cookie-parser failed, reason: getaddrinfo EAI_AGAIN registry .npmjs.org registry.npmjs.org:443

npm WARN registry Using stale package data from https ://registry.npmjs.org/ due to a request error during revalidation.

npm ERR! code EAI_AGAIN

npm ERR! errno EAI_AGAIN

npm ERR! request to https ://registry.npmjs.org/jade failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443

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

npm ERR! /home/me/.npm/_logs/2018-08-21T03_59_43_216Z-debug.log


after search the solution this is a DNS resolving problem and some solution i’ve get to input the IP on /etc/hosts

After inputing the IP, then regenerate install also shown an error :


npm WARN registry Unexpected warning for https ://registry.npmjs.org/: Miscellaneous Warning ERR_TLS_CERT_ALTNAME_INVALID: request to https ://registry.npmjs.org/morgan failed, reason: Hostname/IP does not match certificate’s altnames: Host:registry.npmjs.org. is not in the cert’s altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net

npm WARN registry Using stale package data from https ://registry.npmjs.org/ due to a request error during revalidation.

npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID

npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID

npm ERR! request to https ://registry.npmjs.org/jade failed, reason: Hostname/IP does not match certificate’s altnames: Host:registry.npmjs.org. is not in the cert’s altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net

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

npm ERR! /home/me/.npm/_logs/2018-08-21T04_08_28_915Z-debug.log


How to resolve this kind of warning and error ?

Thank you


registry.npmjs.org ssl certificate error
(system) #2

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.