title: Typeorm cannot resolve Repositories
body: <p>im trying to make a couple of scripts for starting a nestjs app with typeorm included.</p>
  <p>one script is as the following</p>
  <pre><code>async function bootstrap() {
      
      Logger.log(`Calling method for syncing`);
      Logger.log(`Started: ${Date.now()}`);
      const app = await NestFactory.create(AppModule);
      const userService = app.get&lt;UserService&gt;(UserService);
      await userService.XXXX();
      Logger.log(`Ended: ${Date.now()}`);
      await app.close();
  }
  
  bootstrap();
  </code></pre>
  <p>The other is the build in script</p>
  <pre><code>sync function bootstrap() {
    const app = await NestFactory.create(AppModule);
    const corsService = app.get&lt;CorsService&gt;(CorsService);
    app.useGlobalPipes(
      new ValidationPipe({
        whitelist: true,
        transform: true,
        forbidNonWhitelisted: true,
        forbidUnknownValues: true,
        transformOptions: {
          enableImplicitConversion: true,
        },
      }),
    );
    await app.startAllMicroservicesAsync();
    app.enableCors(corsService.getCorsConfig());
    await app.listen(+process.env.APP_PORT | 3005);
  }
  bootstrap();`
  </code></pre>
  <p>The error given in the first start script is</p>
  <p>No repository for &quot;XXXXXXX&quot; was found. Looks like this entity is not registered in current &quot;default&quot; connection?</p>
  <p>Entity path looks like this:</p>
  <pre><code>entities: ['dist/**/**/*.entity.js'],
  </code></pre>
  <p>in project structure the path is dist/src/common/entities/xxx.entity.ts
  It doesnt fit the path but that is the only way it finds the entities</p>
  <p>Any ideas?</p>