본문 바로가기
Web/Front

Typescript Can't be found in the cache and wil

by 김첨지 2023. 8. 28.

 

버셀을 이용하여 서비스를 배포하던 중 다음과 같은 에러가 나타났다.

 

error: Command failed with exit code 1.

Error: Command "yarn install" exited with 1

 

로컬에서 해당 에러를 재현해 보기 위해 yarn install을 시도해 보았다.

 

typescript@patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=d73830 can't be found in the cache and wil

 

모노레포에서 타입스크립트를 사용하던 중 충돌이 발생한 것 같다.

 

yarn.lock 파일을 삭제하고, `yarn cache clean` 커맨드를 입력 후 다시 yarn install 해주었다.

 

https://learn-dev.tistory.com/9

 

위 블로그를 통해 yarn 3.3.0 버전과 타입스크립트 4.9.4 이후 버전의 이슈가 있다는 것을 알게 됐다.

 

모든 워크스페이스의 타입스크립트 버전을 4.9.3 버전으로 맞추어줬다.

 

 

 

Reference

https://github.com/yarnpkg/berry/issues/5125