Reputation: 13
I get the following error after I return a command
npm i npm
My node version is 6.2.0
C:\Users\Shihas>npm i npm
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules
\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com
mand,
operable program or batch file.
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.npmjs.org/npm failed, reason: Hostname/IP d
oes not match certificate's altnames: Host: registry.npmjs.org. is not in the ce
rt'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! C:\Users\Shihas\AppData\Roaming\npm-cache\_logs\2018-09-01T10_10_11
_873Z-debug.log
Any help would be appreciated!
Upvotes: 0
Views: 418
Reputation: 181
The problem seem like you are behind a proxy or something wrong with the network so it can't verify https certificate.
You can try to add this npm config set strict-ssl false
to disable ssl check and then try it install again
Upvotes: 1