I'm trying to import UserService into AuthService but I get this error:
Nest can't resolve dependencies of the UserService (?). Please make sure that the argument UserModel at index [0] is available in the AuthModule context.
Potential solutions:
- Is AuthModule a valid NestJS module?
- If UserModel is a provider, is it part of the current AuthModule?
- If UserModel is exported from a separate @Module, is that module imported within AuthModule?
@Module({
imports: [ /* the Module containing UserModel */ ]
})
Minimum reproduction repository:
https://github.com/Krak798/nest-mongoose-model-import-error
How can I solve this problem?