I'm just trying to connect my nestjs project to my postgresql db by using typeorm. But having
[Nest] 19603 - 09/06/2022, 1:49:42 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)... TypeError: this.postgres.Pool is not a constructor`
I use nestjs ^9.0 , pg ^8.8.0 , typeorm ^0.3.9.
@Module({
imports: [TypeOrmModule.forRoot({
"driver": "postgres",
"type": "postgres",
"host": dbHost,
"port": 5432,
"database": dbName,
"username": dbUser,
"password": dbPassword,
"synchronize": true,
"logging": true,
"entities": [
"src/**/entity/*.ts",
"dist/**/entity/*.js"
]
})],