nestjs / typeorm

TypeORM module for Nest framework (node.js) 🍇

Home Page:https://nestjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to connect to the database.

dkusliy opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

MissingDriverError: Wrong driver: "undefined" given. Supported drivers are: "aurora-mysql", "aurora-postgres", "better-sqlite3", "capacitor", "cockroachdb", "cordova", "expo", "mariadb", "mongodb", "mssql", "mysql", "nativescript", "oracle", "postgres", "react-native", "sap", "sqlite", "sqljs", "spanner".

Config set in ormconfig.js

[Nest] 30 - 07/14/2022, 8:40:02 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (3)...
app_1 | MissingDriverError: Wrong driver: "undefined" given. Supported drivers are: "aurora-mysql", "aurora-postgres", "better-sqlite3", "capacitor", "cockroachdb", "cordova", "expo", "mariadb", "mongodb", "mssql", "mysql", "nativescript", "oracle", "postgres", "react-native", "sap", "sqlite", "sqljs", "spanner".
app_1 | at DriverFactory.create (/usr/src/app/node_modules/typeorm/driver/DriverFactory.js:72:23)
app_1 | at new DataSource (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:49:59)
app_1 | at createTypeormDataSource (/usr/src/app/node_modules/@nestjs/typeorm/dist/typeorm-core.module.js:172:23)
app_1 | at Function. (/usr/src/app/node_modules/@nestjs/typeorm/dist/typeorm-core.module.js:176:46)
app_1 | at Generator.next ()
app_1 | at /usr/src/app/node_modules/@nestjs/typeorm/dist/typeorm-core.module.js:20:71
app_1 | at new Promise ()
app_1 | at __awaiter (/usr/src/app/node_modules/@nestjs/typeorm/dist/typeorm-core.module.js:16:12)
app_1 | at /usr/src/app/node_modules/@nestjs/typeorm/dist/typeorm-core.module.js:174:76
app_1 | at Observable._subscribe (/usr/src/app/node_modules/rxjs/dist/cjs/internal/observable/defer.js:8:31)

Minimum reproduction code

https://gist.github.com/dkusliy/745634b9d142230efdc9824fec8e3461

Steps to reproduce

No response

Expected behavior

connect to postgres

Package version

@nestjs/typeorm: 9.0.0

NestJS version

No response

Node.js version

14.15

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Please provide a minimum reproduction app. I don't think this is related to nestjs, tho.

Why Reproductions are Required.

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.