一些 yarn
操作会报错:
sherror 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
shyarn config set strict-ssl false
查看 yarn
配置:
yarn config list
可以看到如下信息shyarn 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
}
感谢网友评论解答!!!
出现该问题的原因事淘宝镜像原地址 2024年1月22日 已过期,需要设置新的镜像:
shyarn config set registry https://registry.npmmirror.com
本文作者:DingDangDog
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!