title: NestJS TypeOrmModule repository injection seems not working properly
body: <p>I'm trying to inject user repository to UserService, but it seems that typeorm connection is not making. I've googled about this error, but it seems there's not much resource.</p>
  <p>Here's an error log</p>
  <pre><code>[Nest] 18226  - 2021. 11. 30. 오후 7:10:19   ERROR [ExceptionHandler] 
  Nest can't resolve dependencies of the UserRepository (?). 
  Please make sure that the argument Connection at index [0] is available 
  in the TypeOrmModule context.
  
  Potential solutions:
  - If Connection is a provider, is it part of the current TypeOrmModule?
  - If Connection is exported from a separate @Module, is that module imported within TypeOrmModule?
    @Module({
      imports: [ /* the Module containing Connection */ ]
    })
  </code></pre>
  <p>Here's codes</p>
  <p>user.service.ts</p>
  <pre class="lang-js prettyprint-override"><code>
  @Injectable()
  export class UserService {
    constructor(
      @InjectRepository(User) private readonly user: Repository&lt;User&gt;,
    ) {}
  
    ...
  }
  </code></pre>
  <p>user.module.ts</p>
  <pre class="lang-js prettyprint-override"><code>
  @Module({
    imports: [TypeOrmModule.forFeature([User])],
    providers: [UserService],
    exports: [UserService],
    controllers: [UserController],
  })
  export class UserModule {}
  
  </code></pre>
  <p>app.module.ts</p>
  <pre class="lang-js prettyprint-override"><code>
  @Module({
    imports: [
      ConfigModule.forRoot({
        ...
      }),
      TypeOrmModule.forRoot({
        type: 'postgres',
        ...,
        synchronize: process.env.NODE_ENV !== 'prod',
        logging:
          process.env.NODE_ENV !== 'prod' &amp;&amp; process.env.NODE_ENV !== 'test',
        entities: [User, Wiki],
      }),
      MongooseModule.forRoot(process.env.MONGODB_ROOT),
      UserModule,
      WikiModule,
    ],
    controllers: [],
    providers: [],
  })
  export class AppModule {}
  
  </code></pre>