title: Nest can't resolve dependencies of the Service in Global Module
body: <p>I have a global module called <code>FirebaseModule</code> which exports a <code>FirebaseService</code>, I import this module to the <code>app.module.ts</code> and then I try to use the <code>FirebaseService</code> inside a <code>UsersService</code> and it fails with a missing dependency issue.</p>
  <p>Something interesting is that if I remove the usage on the service and use it only on the controller nothings fails but if I want to use it in the service provider, it starts failing.</p>
  <p>My code:</p>
  <p><code>app.module.ts</code></p>
  <pre><code>@Module({
    imports: [
      CustomLoggerModule,
      ConfigurationModule,
      TypeOrmModule.forRootAsync({
        useExisting: ConfigurationService,
      }),
      FirebaseModule,
      UsersModule,
    ],
    controllers: [AppController],
    providers: [AppService],
  })
  export class AppModule {}
  </code></pre>
  <p><code>firebase.module.ts</code></p>
  <pre><code>@Global()
  @Module({
    imports: [],
    providers: [FirebaseService],
    exports: [FirebaseService],
  })
  export class FirebaseModule {}
  </code></pre>
  <p><code>users.module.ts</code></p>
  <pre><code>@Module({
    imports: [CqrsModule, TypeOrmModule.forFeature([UsersRepository])],
    controllers: [UsersController],
    providers: [UsersService, ...CommandHandlers, ...EventHandlers],
    exports: [UsersService, TypeOrmModule.forFeature([UsersRepository])],
  })
  export class UsersModule {}
  </code></pre>
  <p><code>users.controller.ts</code></p>
  <pre><code>@Controller('users')
  @UseGuards(AuthGuard('firebase'))
  export class UsersController {
    constructor(
      private readonly usersService: UsersService,
      private readonly firebaseService: FirebaseService,
    ) {}
  }
  </code></pre>
  <p><code>users.service.ts</code></p>
  <pre><code>@Injectable()
  export class UsersService {
    constructor(
      private readonly firebaseService: FirebaseService,
      private readonly repository: UsersRepository,
    ) {}
  }
  </code></pre>
  <p>I get the following error:</p>
  <pre><code>Nest can't resolve dependencies of the UsersService (?, UsersRepository). Please make sure that the argument dependency at index [0] is available in the UsersModule context.
  </code></pre>