npm ERR! code CERT_HAS_EXPIRED
npm install yarn - g 出现错误
执行下面代码:
npm cache clean --force
npm config set strict-ssl false
重新按照yarn按照成功。
npm install yarn - g
前置一定要设置配置镜像:
npm config set registry https://r.cnpmjs.org/
查看镜像是否配置成功
npm config get registry