Hi I just got this error EntityMetadataNotFoundError: No metadata was found. when run a simple find like this.balanceRepository.find({ })
I have researched but found nothing for this situation .
Have anyone got this error before ?
I'm using Typeorm 0.3x version
Here are my config for these two dbs:
TypeOrmModule.forRootAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async (configService: ConfigService) => {
const username = configService.get('timescaledb.user');
const password = configService.get('timescaledb.pass');
const database = configService.get('timescaledb.db');
const host = configService.get('timescaledb.host');
const port = parseInt(configService.get('timescaledb.port'), 10);
return {
type: 'postgres',
host,
port,
username,
password,
database,
entities: ['dist/src/modules/**/*.timescaledb.entity.js'],
migrations: ['migrations/timescaledb/*.js'],
synchronize: false,
};
},
}),
TypeOrmModule.forRootAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async (configService: ConfigService) => {
const username = configService.get('postgres.user');
const password = configService.get('postgres.pass');
const database = configService.get('postgres.db');
const host = configService.get('postgres.host');
const port = parseInt(configService.get('postgres.port'), 10);
return {
type: 'postgres',
host,
port,
username,
password,
database,
entities: ['dist/src/modules/**/*.postgres.entity.js'],
migrations: ['migrations/postgres/*.js'],
synchronize: false,
};
},
}),