Skip to content

[BUG] nestjs-pino does not support lazy-loaded modules #2069

Description

@casey-chow

What is the current behavior?

When I try to lazy-load a module that includes a @InjectPinoLogger decorator, it cannot start.

What is the expected behavior?

Lazy-loading modules should properly inject the logger.

Please provide minimal example repo, not code snippet. Without example repo this issue will be closed.

https://github.com/casey-chow/nestjs-pino-repro

To run and observe failure:

  1. Clone the repository.
  2. npm install
  3. npm start

Please mention other relevant information such as Node.js version and Operating System.

I'm on Node 22.2 and macOS Sonoma.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions