Closed tmtung144 closed 3 years ago
try run ts-node ./node_modules/typeorm-seeding/dist/cli.js seed -s CreateUsers
works well
@tmtung144 Since you are using npm run ...
the -s
flag will be passed to npm run
command, not to typeorm-seeding seed
Use npm run typeorm-seeding -- seed -s CreateUsers
or with Yarn yarn typeorm-seeding seed -s CreateUser
Closing, since it seems to be resolved. If you have any further issues regarding this topic please feel free to reopen.
I need to run each seed operation individually, in the terminal when I run seed: run I see an option:
--seed, -s Specific seed class to run.
but when i run the command:npm run typeorm-seeding seed -s CreateUsers
with my seed file 1-create-users.seed.ts like this:It keeps announcing
Unknown argument: CreateUsers
It works well when it's just runningnpm run typeorm-seeding seed
Looking forward to receiving any useful advice.