解决vue项目中npm i element-ui -S报错问题
报错内容如下:
C:\Users\计算机名\Desktop\vue-elemeui>npm i element-ui -S
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.cnpmjs.org/element-ui 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\计算机名\AppData\Roaming\npm-cache\_logs\2020-10-31T14_00_00_465Z-debug.log
解决:npm config set strict-ssl false