I had a similar issue, and I reported it at the bottom of this thread.
You probably have synchronize: true
on your ORM configuration. Because of this, every time you run your app Typeorm tries to create the tables. If you have data in your DB, it throws that misleading error.
From here:
synchronize – Indicates if database schema should be auto created on every application launch. Be careful with this option and don’t use this in production – otherwise you can lose production data. This option is useful during debug and development. As an alternative to it, you can use CLI and run schema:sync command. Note that for MongoDB database it does not create schema, because MongoDB is schemaless. Instead, it syncs just by creating indices.