skip to Main Content

I was following this blog https://wanago.io/2022/07/25/api-nestjs-database-migrations-typeorm/ to setup migrations in my nestjs project but got the error that dataSourceFileExport i.e DataSource object exported from the migration.config.ts is not iterable. And I don’t know why it’s not iterable. I couldn’t find the solution on any platform

Error in the terminal

migration.config.ts

migration scripts

2

Answers


  1. Change in migration.config.ts:

    export const AppDataSource: Datasource = new DataSource({...})
    
    Login or Signup to reply.
  2. This is a known issue introduced in TypeORM v0.3.8 and fixed in v0.3.9

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search