NestJS - Injected service is undefined in the constructor
The "emitDecoratorMetadata": true
is missing in your tsconfig.json
file.
Just stumbled across the same issue in one of my providers - the problem was that I forgot to annotate the provider with an @Injectable()
decorator after I have added it to the respective module.
One of my providers was scoped with REQUEST
scope. I removed it and it resolved more errors than one.