NestJS: TypeError: Cannot read property 'find' of undefined
I heard about NestJS and really wanted to try it out. I followed a basic getting started and ended up in the following error for custom repository instantiation.
TypeError: Cannot read property 'find' of undefined
After some search, I found a solution in nestjs/typeorm issues.
Fix
Do not provide the custom repository in the
providers
array of NestJSmodule
. TypeORM does its own thing.
After removing the repository from the providers
array, it worked fine. ^_^