使用
npm config set registry http://registry.cnpmjs.org/
语句后报错 如下
C:\Users\hp\Desktop\vue-manage-system>npm i
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.cnpmjs.org/axios 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! D:\Program Files (x86)\node\node_cache\_logs\2020-10-09T12_01_24_338Z-debug.log
C:\Users\hp\Desktop\vue-manage-system>npm config set strict-ssl false
解决方案
C:\Users\hp\Desktop\vue-manage-system>npm config set strict-ssl false