Hexo静态博客看板娘安装报错解决方案

自从搭建了个人博客之后,就迫不及待地想要将其完善。
别的不说,起码得有一位看板娘来镇镇场子吧。说干就干,可哪曾想过程如此的不顺利!一上来执行npm install --save hexo-helper-live2d就报错…

npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.cnpmjs.org/hexo-helper-live2d 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:

经过仔细排查和google,原来是ssl 的问题。
解决方法:
输入:

npm config set strict-ssl false
npm install -g supervisor

完事儿之后再执行npm install --save hexo-helper-live2d就没得问题咯~
原文链接
解决方法参考文章

猜你喜欢

转载自blog.csdn.net/btfqn1024/article/details/115278487