I\'m failed to compile with this error:
Nest can\'t resolve dependencies of the JWT_MODULE_OPTIONS (?). Please make sure that the argument at index [0] is available
I somehow got it to work by adding
JwtModule.registerAsync({
imports: [ConfigModule], // Missing this
useFactory: async (configService: ConfigService) => ({
signOptions: {
expiresIn: config.expiresIn,
},
secretOrPrivateKey: config.jwtSecret,
}),
inject: [ConfigService],
}),
in the app.module.ts and auth.module.ts