[Yarn] Error: certificate has expired

FGPRJS·2024년 2월 16일

오류 사항

Yarn install을 수행하는데 이하와 같은 오류 발생

error Error: certificate has expired
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:394:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

오류 원인

yarn과 관련된 어떤 곳(종속성이나 등등)에서 ssl 인증서가 만료된 것으로 보인다.

해결법

  • 보안을 약화시키는 방법이므로 어디까지나 임시방편.
  1. 이하와 같은 명령어로 config 목록 확인하기

yarn config list
  1. strict-ssl 항목을 확인한다.
{
  	'other-configs1': '...',
  	'strict-ssl': true,
  	'other-configs2': '...'
}
  1. true인 strict-ssl을 false로 하면 된다.
yarn config set strict-ssl false
  1. 다시 yarn install하면 된다.
profile
FGPRJS

0개의 댓글