TypeORM can't locate your User entity file based on the import path in your data-source.ts file. you need to properly import the entity. Also, The typeorm CLI expects migration names as strings, so specify it properly by running npx typeorm migration:generate -n UserMigration -d src/data-source.ts