I'm puzzled by the error message I received: [Nest] 1276 - 25/04/2024 19:39:31 ERROR [ExceptionHandler] Nest can't resolve dependencies of the AuthService (?, JwtService). Please make sure that the argument UsersService at index [0] is available in the AuthModule context.
Here are some potential solutions:
- Check if AuthModule is a valid NestJS module
- If UsersService is a provider, ensure it is part of the current AuthModule
- If UsersService is exported from a separate @Module, make sure that module is imported within AuthModule
It's perplexing because the same code runs fine in another project. Here is a snippet of my file:
authModule:
(AuthModule content here)
appModule:
(AppModule content here)
UserModule:
(UserModule content here)
AuthService:
(AuthService content here)
I'm struggling to understand why Nest is having trouble resolving the jwtService dependency.