Entity metadata for Role#users was not found

I am using NestJS with PostgreSQL and I had the same issue. The problem was by me is that I forgot to import the entity in the module with the TypeOrmModule.forFeature function.

@Module({
  imports: [TypeOrmModule.forFeature([Users, ...])],  <--- Importing the entity!
  controllers: [...],
  providers: [...],
  exports: [...],
})

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)