我返回命令后收到以下错误
npm i npm
我的节点版本是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
任何帮助,将不胜感激!
问题似乎是你背后的代理或网络出了问题所以它无法验证https证书。
您可以尝试添加此npm config set strict-ssl false
以禁用ssl检查,然后再次尝试安装