개발 학습일지(TIL)

[TIL] : ERROR [ExceptionsHandler] No metadata for * was found. EntityMetadataNotFoundError: No metadata for * was found.

Veams 2023. 3. 8.

목차

[TIL] : ERROR [ExceptionsHandler] No metadata for * was found. EntityMetadataNotFoundError: No metadata for * was found.
[TIL] : ERROR [ExceptionsHandler] No metadata for * was found. EntityMetadataNotFoundError: No metadata for * was found.

 

이 에러로 인해 고생하고 있었다.

ERROR [ExceptionsHandler] No metadata for "SearcherRepository" was found.
EntityMetadataNotFoundError: No metadata for "SearcherRepository" was found.

 

SearcherRepository 파일을 찾을 수 없다는 에러이다.

 

구글링을 해보면 이 경우 두 가지가 문제라며 해결 방법을 제시한다.

[TIL] : ERROR [ExceptionsHandler] No metadata for * was found. EntityMetadataNotFoundError: No metadata for * was found.

1) 해당 모듈의 Entity파일에 @Entitiy() 데코레이터를 적지 않은 경우 (위 사진은 정상상태)

 

 

[TIL] : ERROR [ExceptionsHandler] No metadata for * was found. EntityMetadataNotFoundError: No metadata for * was found.

2) entity 경로가 제대로 설정 않은 경우  (위 사진도 문제가 없다)

 

하지만 나의 경우, 위의 문제가 없었는데 계속 오류가 생겼다.

문제는 다른 곳에 있었다.

 

3) 케이스에서 문제 발생. *.module.ts

[TIL] : ERROR [ExceptionsHandler] No metadata for * was found. EntityMetadataNotFoundError: No metadata for * was found.

해당 모듈  (*.moudule.ts) 에서  providers 부분에 특정 Repository를 기재하지 않아서 생긴 문제였다...

 

Repository를 새로 구성하고 작성한 뒤에, 정작 해당 모듈에는 필요한 Repsitory는 기재하지 않아서 생긴 문제!

 

해결 완료

 

 

 

참고....

https://puleugo.tistory.com/101

 

[NestJS] EntityMetadataNotFound Error: No metadata for * was found.

jest에서 엔티티를 찾지 못할 때, 발생하는 버그입니다. 테스트 파일에서 entities에 경로를 넣었을 때 엔티티파일을 찾지 못했을 때 발생합니다. 위가 저한테 발생한 오류이고, 경로는 다음과 같이...

puleugo.tistory.com

https://maggie-a.tistory.com/317

 

EntityMetadataNotFoundError: No metadata for "Boards" was found.

//에러 [Nest] 6655 - 2022. 02. 02. 오후 1:49:12 ERROR [ExceptionHandler] No metadata for "Board" was found. EntityMetadataNotFoundError: No metadata for "Board" was found. at EntityMetadataNotFoundError.TypeORMError [as constructor] (/Users/xxx/Desktop...

maggie-a.tistory.com

 

댓글