MissingDriverError: Wrong driver: "undefined" given.

See original GitHub issue

Issue type:

[ ] question [X] bug report [ ] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [ ] mongodb [ ] mssql [ ] mysql / mariadb [ ] oracle [X] postgres [ ] cockroachdb [ ] sqlite [ ] sqljs [ ] react-native [ ] expo

TypeORM version:

[X] latest [ ] @next [ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

I’m trying to run migrations, however, using the same ORM connection options that work on the server, the CLI throws:

MissingDriverError: Wrong driver: "undefined" given. Supported drivers are: "cordova", "expo", "mariadb", "mongodb", "mssql", "mysql", "oracle", "postgres", "sqlite", "sqljs", "react-native".
    at new MissingDriverError (/home/feimosi/Projects/saycaster-podcatcher/backend/src/error/MissingDriverError.ts:8:9)
    at DriverFactory.create (/home/feimosi/Projects/saycaster-podcatcher/backend/src/driver/DriverFactory.ts:55:23)
    at new Connection (/home/feimosi/Projects/saycaster-podcatcher/backend/src/connection/Connection.ts:125:43)
    at ConnectionManager.create (/home/feimosi/Projects/saycaster-podcatcher/backend/src/connection/ConnectionManager.ts:64:28)
    at Object.<anonymous> (/home/feimosi/Projects/saycaster-podcatcher/backend/src/index.ts:223:35)
    at step (/home/feimosi/Projects/saycaster-podcatcher/backend/node_modules/tslib/tslib.js:133:27)
    at Object.next (/home/feimosi/Projects/saycaster-podcatcher/backend/node_modules/tslib/tslib.js:114:57)
    at /home/feimosi/Projects/saycaster-podcatcher/backend/node_modules/tslib/tslib.js:107:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/feimosi/Projects/saycaster-podcatcher/backend/node_modules/tslib/tslib.js:103:16)

I run it with the following command (based on this article): ts-node ./node_modules/typeorm/cli -f ./src/orm.config.ts

I’m sure type: 'postgres' property is set. Am I missing something?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:30 (1 by maintainers)

github_iconTop GitHub Comments

114reactions
KillerCodeMonkeycommented, May 11, 2019

solved it by export the config this way in my ormconfig.ts:

export = ORMConfig
20reactions
vithalreddycommented, Apr 21, 2020

module.exports = ORMConfig; working for me in latest version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MissingDriverError when type is oracle : using typeorm
js:196:12) name: 'MissingDriverError', message: 'Wrong driver undefined given. Supported drivers are: "mysql", "postgres", "mssql", "oracle", " ...
Read more >
Typeorm - Fix for MissingDriverError: Wrong driver
This is an issue with an incorrect database connection configuration passed to typeorm. typeorm MissingDriverError: Wrong driver: “undefined” ...
Read more >
typeorm missingdrivererror: wrong driver: "undefined" given.
typeorm missingdrivererror: wrong driver: "undefined" given. Clear input field icon.
Read more >
A brand new website interface for an even better experience!
MissingDriverError : Wrong driver: "undefined" given.
Read more >
MissingDriverError - typeorm
Thrown when consumer specifies driver type that does not exist or supported. Hierarchy. Error. MissingDriverError. Index. Constructors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found