Closed JoshuaM1995 closed 3 years ago
Changing my ORMConfig to this worked: factories: [``${__dirname}/src/factories/**/*{.ts,.js}``],
It would be nice if there was some type of error like "no factories found" or something along those lines.
Changing my ORMConfig to this worked:
factories: [
${__dirname}/src/factories/*/{.ts,.js}],
It would be nice if there was some type of error like "no factories found" or something along those lines.
I can't seem to find this option here for factories
https://github.com/typeorm/typeorm/blob/master/docs/connection-options.md
@robophil That's because it's from typeorm-seeding
package, not from TypeORM. Here is the section.
I got the following error when trying to run a seed. In the CLI, it's saying the ORMConfig has been loaded, factories and seeders are imported, database connected and the seeder itself has been executed.
Here's user.factory.ts:
create-users.seed.ts:
ormconfig.js: