![[NestJS] Can't find module 'entity' from 'service.ts' 에러](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FsvoJW%2FbtrJu1nPZYs%2FAAAAAAAAAAAAAAAAAAAAANlP4bb4_kyWr55r7SPeL5S0VO_q7dwifpRBja9oBa1D%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1751295599%26allow_ip%3D%26allow_referer%3D%26signature%3DeUjx0h%252FUYfw3oGcjWWRueqpsEaE%253D)
Node.js2022. 8. 12. 00:15[NestJS] Can't find module 'entity' from 'service.ts' 에러
NestJS에서 엔티티 위치를 찾을 수 없다는 말입니다. 주로 entity를 찾을 수 없다고 나오지만 이는 "경로 지정이 잘못되었을 때" 나오는 에러입니다. 에러 발생 포인트: 레퍼지토리를 연결하여 CRUD 메소드를 만든 후(Entity 연동 후), Test를 돌려보니 에러가 남. 에러 원인: tsconfig.json과 pakage.json의 모듈 네임 매퍼가 같지 않음. tsconfig.json "jest": { "moduleDirectories": [ "node_modules", "src" ], "moduleFileExtensions": [ "js", "json", "ts" ], "roots": ["","src"], "testRegex": ".*\\.spec\\.ts$", "transform": { ..