79513882

Date: 2025-03-17 07:44:17
Score: 0.5
Natty:
Report link

The issue here is that NestJS does not automatically inject dependencies into a parent class constructor. When you extend a class, the super() constructor is called before the configService is available, leading to undefined.

Further explanation: NestJS automatically resolves dependencies without needing @Inject() because of TypeScript's metadata reflection (enabled by emitDecoratorMetadata and reflect-metadata).

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Inject
  • Low reputation (0.5):
Posted by: Motunrayo Koyejo