WebStrom 报错:error Error: certificate has expired at TLSSocket.onConnectSecure (node:_tls_wrap:15

弯路十三郎 2024-07-29 17:33:08 阅读 97

报错情况:

<code>[2/4] Fetching packages...

error Error: certificate has expired

at TLSSocket.onConnectSecure (node:_tls_wrap:1539:34)

at TLSSocket.emit (node:events:513:28)

at TLSSocket._finishInit (node:_tls_wrap:953:8)

at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:734:12)

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

 StackOver同样有这样的问题

解决方法:

①禁用SSL证书验证

<code>yarn config set strict-ssl false

②重新设置npm镜像源(二选一)

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

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



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。