![[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.](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
![[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.](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
이 에러로 인해 고생하고 있었다.
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. [TIL] : ERROR [ExceptionsHandler] No metadata for * was found. EntityMetadataNotFoundError: No metadata for * was found.](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
1) 해당 모듈의 Entity파일에 @Entitiy() 데코레이터를 적지 않은 경우 (위 사진은 정상상태)
![[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.](https://blog.kakaocdn.net/dna/eHTEsy/btr2voy4mLe/AAAAAAAAAAAAAAAAAAAAAI4x0ZdSYqmj3ilijJjfwJoVY4oyakksKMoXbEPOGKW1/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&expires=1756652399&allow_ip=&allow_referer=&signature=u85n57egG9aDPGdDeMTLJeXHagQ%3D)
2) entity 경로가 제대로 설정 않은 경우 (위 사진도 문제가 없다)
하지만 나의 경우, 위의 문제가 없었는데 계속 오류가 생겼다.
문제는 다른 곳에 있었다.
3) 케이스에서 문제 발생. *.module.ts
![[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.](https://blog.kakaocdn.net/dna/UPKvR/btr2uZMRxWf/AAAAAAAAAAAAAAAAAAAAACeXW8W6uJB80i8PmYvbV1KkH8zJ1rBUonFDRnZ9htg6/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&expires=1756652399&allow_ip=&allow_referer=&signature=pOr2jtv0DKr%2FJgfb%2FuAwALOGb5I%3D)
해당 모듈 (*.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
'개발 학습일지(TIL)' 카테고리의 다른 글
[TIL] : Nest can't resolve dependencies, 의존성 주입! @Injectable() 데코레이터 잘못 쓰면 에러가 발생한다. (0) | 2023.03.12 |
---|---|
[TIL] CSS 적용이 안 되는 이유. 일부 페이지만 CSS 적용 안 되는 오류 (0) | 2023.03.11 |
[TIL] : Nestjs 에서 express-ejs-layouts 사용하기 require() vs import() (0) | 2023.03.06 |
TIL : ts-node: command not found 오류 (0) | 2023.01.17 |
TIL : Git 명령어, github에 잘못 올린 폴더 삭제 (0) | 2022.12.29 |
댓글