Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI error with postgres: InvalidData: data did not match any variant of untagged enum ArgsEnum #90

Closed
quaos opened this issue Jul 24, 2020 · 3 comments · Fixed by #92
Closed
Labels
bug Something isn't working

Comments

@quaos
Copy link

quaos commented Jul 24, 2020

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:

[ ] latest
[ ] @next
[x] 0.2.23-rc5 (or put your version here)

Steps to reproduce or a small repository showing the problem:

  • Install TypeORM CLI
  • Create a project
  • Prepare some PostgresQL test database
  • Set up environment variables:
$ env |grep TYPEORM_
TYPEORM_HOST=localhost
TYPEORM_CONNECTION=postgres
TYPEORM_PORT=5432
TYPEORM_USERNAME=****
TYPEORM_PASSWORD=****
TYPEORM_DATABASE=testdb
TYPEORM_ENTITIES_DIR=src/entities
TYPEORM_MIGRATIONS_DIR=src/migrations
TYPEORM_MIGRATIONS_TABLE_NAME=__typeorm_migrations
TYPEORM_LOGGING=true
TYPEORM_SYNCHRONIZE=false
  • Try running TypeORM CLI commands:
$ typeorm migration:run
Error during migration run:
InvalidData: data did not match any variant of untagged enum ArgsEnum
    at unwrapResponse ($deno$/ops/dispatch_json.ts:42:11)
    at Object.sendAsync ($deno$/ops/dispatch_json.ts:93:10)
    at async Object.connect ($deno$/net.ts:183:11)
    at async Connection.startup (connection.ts:138:17)
    at async Pool._createConnection (pool.ts:32:5)
    at async pool.ts:61:7
    at async Promise.all (index 0)
    at async Pool._startup (pool.ts:63:25)
    at async Pool.connect (pool.ts:85:5)
    at async PostgresDriver.createPool (PostgresDriver.ts:944:28)
$ typeorm migration:show
# Same error
$ typeorm cache:clear
# Same error
  • Now, try changing TYPEORM_CONNECTION to sqlite and run typeorm migration:run again. There'd be no error, with a sqlite db file created.
@uki00a
Copy link
Member

uki00a commented Jul 25, 2020

Thanks for opening this issue!
I was able to reproduce the same issue.
I'll look into it.

@uki00a
Copy link
Member

uki00a commented Jul 25, 2020

This problem has been fixed at v0.2.23-rc6!

@quaos
Copy link
Author

quaos commented Jul 25, 2020

This problem has been fixed at v0.2.23-rc6!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants