-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read properties of undefined(reading 'number') #214
Comments
Hi! Can you just put some more explicit example, or maybe create a repo to reproduce this? Just because you talked about gender but I cannot see that on entity |
Hi my case in Entity: @entity() @column() @column() @column() @column({ nullable: true }) And I have a file user.factory.ts : import * as Faker from "faker"; define(User, (faker: typeof Faker) => { const user = new User(); I fix with : Change column User entity: Change faker.random.number: "seed:run": "ts-node ./node_modules/typeorm-seeding/dist/cli.js --configName ./ormconfig.json seed" this is work to me. My Repository: |
@andi-faizal94 Hi, |
#edited
I have entity:
user.factory.ts
I have problem with file user.factory.ts:
const gender = faker.random.number(1)
To solve my problem i change:
@PrimaryGeneratedColumn("uuid")
id: string;
change with:
"seed:run": "ts-node ./node_modules/typeorm-seeding/dist/cli.js seed"
change with:
"seed:run": "ts-node ./node_modules/typeorm-seeding/dist/cli.js --configName ./ormconfig.json seed"
this is work to me.
Thank you.
The text was updated successfully, but these errors were encountered: