npm install @ionic-native/location-accuracy
后出现错误:
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.cnpmjs.org/@ionic-native%2flocation-accuracy failed, reason: Hostname/IP does not match certificate’s altnames: Host: registry.cnpmjs.org. is not in the cert’s altnames: DNS:r.cnpmjs.org
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dongdong\AppData\Local\npm-cache_logs\2021-01-20T02_24_06_148Z-debug.log
别急,先点开上述错书日志:
Hostname/IP does not match certificate’s altnames: Host: registry.cnpmjs.org. is not in the cert’s altnames: DNS:r.cnpmjs.org
根据错误百度或者谷歌,推荐谷歌。
尝试使用 :
npm set strict-ssl false
npm config set registry http://registry.npmjs.org/
一定要看错误日志,
一定要看错误日志,
一定要看错误日志。
程序猿的必修日志。