title: NestJS: Cannot find module in dev mode
body: <p><a href="https://i.stack.imgur.com/HPSLq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HPSLq.png" alt="enter image description here"></a></p>
  
  <p>I have this error in development mode of an application with NestJS.</p>
  
  <p>My configuration file is as follows:</p>
  
  <pre><code>export const ORM_CONFIG: TypeOrmModuleOptions = {
    keepConnectionAlive: true,
    type: 'postgres',
    host: 'localhost',
    port: 5432,
    username: 'postgres',
    password: 'postgres',
    database: 'aimbra_education',
    schema: 'security',
    synchronize: true,
    entities: [
     --Entities
    ],
    // migrations: [__dirname + '/migration/**/*.ts'],
    // subscribers: [__dirname + '/subscriber/**/*.ts'],
  };
  </code></pre>
  
  <p>I import into:</p>
  
  <pre><code>@Module({
    imports: [
      TypeOrmModule.forRoot(ORM_CONFIG),
    ],
    controllers: [AppController],
    providers: [AppService],
  })
  export class AppModule {}
  
  </code></pre>
  
  <p>So far I couldn't identify the error of why it works in production and doesn't work in development mode to watch my modifications.</p>