2024-01-26
温故知新
00

目录

简介
临时解决
其他

简介

一些 yarn 操作会报错:

sh
error Error: certificate has expired at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34) at TLSSocket.emit (node:events:513:28) at TLSSocket._finishInit (node:_tls_wrap:959:8) at ssl.onhandshakedone (node:_tls_wrap:743:12) info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

临时解决

  • 关闭 ssl
sh
yarn config set strict-ssl false

其他

查看 yarn 配置:

  • 运行:yarn config list 可以看到如下信息
sh
yarn config v1.22.21 info yarn config { 'version-tag-prefix': 'v', 'version-git-tag': true, 'version-commit-hooks': true, 'version-git-sign': false, 'version-git-message': 'v%s', 'init-version': '1.0.0', 'init-license': 'MIT', 'save-prefix': '^', 'bin-links': true, 'ignore-scripts': false, 'ignore-optional': false, registry: 'https://registry.npm.taobao.org/', 'strict-ssl': true, 'user-agent': 'yarn/1.22.21 npm/? node/v18.14.0 win32 x64', lastUpdateCheck: 1706248207836 } info npm config { registry: 'https://registry.npm.taobao.org/', python: 'C:\\Users\\xxhu1\\.windows-build-tools\\python27\\python.exe', 'strict-ssl': false }
如果对你有用的话,可以打赏哦
打赏
ali pay
wechat pay

本文作者:DingDangDog

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!