npm安装报错

npm ERR! request to https://registry.cnpmjs.org/element-ui failed, reason: Hostname/IP does not match certificate's altn ames: Host: registry.cnpmjs.org. is not in the cert's altnames: DNS:r.cnpmjs.org

报错原因: https的自签名失败

解决方法:终端输入: npm config set strict-ssl false

posted @ 2021-08-04 09:09  甲辰哥来帮你算命  阅读(223)  评论(0编辑  收藏  举报