title: NestJS can't resolve dependencies of the JWT_MODULE_OPTIONS (Same problem, different solution)
body: <p><strong>This is not duplicate! I saw same problem <a href="https://stackoverflow.com/questions/57463523/nestjs-cant-resolve-dependencies-of-the-jwt-module-options">here</a>, but solution not helped.</strong></p>
  <p>My NestJS instance is not starting because of this problem:</p>
  <pre><code>Nest can't resolve dependencies of the JWT_MODULE_OPTIONS (?). Please make sure that the argument ConfigService at index [0] is available in the JwtModule context.
  </code></pre>
  <p>My auth.module.ts:</p>
  <pre><code>@Module({
    imports: [
      TypeOrmModule.forFeature([User, Token]),
      DatabaseModule,
      UserModule,
      ConfigModule,
      PassportModule,
      JwtModule.registerAsync({
        imports: [ConfigModule], // Missing this
        useFactory: async (configService: ConfigService) =&gt; ({
          signOptions: {
            expiresIn: configService.get&lt;string&gt;('JWT_EXPIRATION'),
          },
          secretOrPrivateKey: configService.get&lt;string&gt;('JWT_SECRET'),
        }),
        inject: [ConfigService],
      }),
    ],
    controllers: [AuthController],
    providers: [AuthService, LocalStrategy],
  })
  export class AuthModule {}
  </code></pre>
  <p>and this is my app.module.ts (Entry Module):</p>
  <pre><code>@Module({
    imports: [
      ConfigModule.forRoot({
        envFilePath: '.development.env',
      }),
      AuthModule,
      UserModule,
      DatabaseModule,
    ],
  })
  export class AppModule {}
  </code></pre>
  <p>I am importing module correctly by <code>imports: [ConfigModule]</code>, but still I am getting error, that injection failed, because module is not imported.</p>
  <p>My ConfigModule is 100% imported into app as my log say: <code>ConfigModule dependencies initialized</code></p>
  <p>What am I doing wrong?</p>