前端

win 10下git bash窗口,通过npm安装yarn报错

$ npm install -g yarn
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/yarn failed, reason: certificate has expired

npm ERR! A complete log of this run can be found in: C:\Users\Marcus\AppData\Local\npm-cache\_logs\2024-03-05T07_18_27_654Z-debug-0.log

解决办法:

npm install -g yarn --strict-ssl=false

ok