npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/pnpm failed, reason: certificate has expired    

npm ERR! A complete log of this run can be found in: C:\Users\zhuhua.xu\AppData\Local\npm-cache\_logs\2024-03-06T09_15_34_117Z-debug-0.log

尝试使用http而不是https: 有时,切换到http源而不是https可以解决证书问题。你可以运行以下命令来更改registry:

npm config set registry http://registry.npm.taobao.org/

然后再运行npm install -g pnpm。

安装成功~

在这里插入图片描述

更多推荐