title: NestJs cannot istantiate module (circular dependencies error?)
body: <p>I have two modules which depend on each other.</p>
  <p>GameModule.ts</p>
  <pre><code>import { Module, CacheModule, Global } from '@nestjs/common';
  import { GameController } from './game.controller';
  import { GameService } from './game.service';
  import { PlayerModule } from '@src/player/player.module';
  
  @Global()
  @Module({
    imports: [
      CacheModule.register(),
      PlayerModule,
    ],
    controllers: [GameController],
    providers: [GameService],
    exports: [CacheModule, GameService],
  })
  export class GameModule {}
  </code></pre>
  <p>PlayerModule.ts</p>
  <pre><code>import { Module, Global } from '@nestjs/common';
  import { PlayerController } from './player.controller';
  import { PlayerService } from './player.service';
  import { GameModule } from '@src/game/game.module';
  import { Web3ManagerModule } from '@src/web3-manager/web3-manager.module';
  
  @Global()
  @Module({
    imports: [GameModule, Web3ManagerModule],
    controllers: [PlayerController],
    providers: [PlayerService],
    exports: [PlayerService],
  })
  export class PlayerModule {}
  </code></pre>
  <p>I defined in their services the other one with forwardRef</p>
  <p>GameService.ts</p>
  <pre><code>...
  constructor(
      @Inject(CACHE_MANAGER) private cacheManager: Cache,
      @Inject(forwardRef(() =&gt; PlayerService))
      private playerService: PlayerService,
    ) {
  ...
  </code></pre>
  <p>PlayerService.ts</p>
  <pre><code>...
  constructor(
      @Inject(forwardRef(() =&gt; GameService))
      private gameService: GameService,
      private web3Manager: Web3ManagerService,
    ) {
  ...
  </code></pre>
  <p>but I keep getting the error:</p>
  <pre><code>Nest cannot create the GameModule instance.
  The module at index [1] of the GameModule &quot;imports&quot; array is undefined.
  Potential causes:
  - A circular dependency between modules. Use forwardRef() to avoid it. Read more: https://docs.nestjs.com/fundamentals/circular-dependency
  - The module at index [1] is of type &quot;undefined&quot;. Check your import statements and the type of the module.
  </code></pre>
  <p>What am I missing?</p>