AshKeys

Confessions and Confusions of a Freelance Fullstacker.

Ashok Mannolu Arunachalam, FixNestJSTypeORMNodeJS
Back

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 NestJS module. TypeORM does its own thing.

After removing the repository from the providers array, it worked fine. ^_^