providers declares classes that belong to this module's DI scope — NestJS instantiates them. imports lists other modules whose exported providers this module wants to use. A common mistake is adding a service class directly to imports instead of its module, which causes a cryptic startup error.
The distinction is fundamental: providers owns the classes this module is responsible for creating. imports borrows functionality from other modules by referencing the module class, never the service class directly.
providers — classes this module owns and instantiates.
imports — module classes (not service classes) that this module depends on.
If a service lives in another module, import that module and ensure it exports the service.
Adding a service directly to imports is the most common NestJS beginner mistake.