© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•15mo ago•
3 replies
ls

How to use drizzle-seed to seed data?

I tried to use the drizzle-seed library to seed my local DB, but I get an error.

Libraries I'm using:
"drizzle-orm": "^0.36.4",
"drizzle-seed": "^0.1.2",

This is my code:
import { seed } from 'drizzle-seed';
import * as schema from './Schema';

await seed(dbClient, schema);
import { seed } from 'drizzle-seed';
import * as schema from './Schema';

await seed(dbClient, schema);


Error I get with the postgres driver:
Seed error: TypeError: Cannot read properties of undefined (reading 'length')
at /myApp/node_modules/drizzle-seed/index.cjs:131270:50
at Array.every (<anonymous>)
at GenerateValuesFromArray.checks (/myApp/node_modules/drizzle-seed/index.cjs:131270:24)
at GenerateValuesFromArray.init (/myApp/node_modules/drizzle-seed/index.cjs:131312:14)
at SeedService.generateColumnsValuesByGenerators (/myApp/node_modules/drizzle-seed/index.cjs:134363:43)
at SeedService.generateTablesValues (/myApp/node_modules/drizzle-seed/index.cjs:134322:38)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async seedPostgres (/myApp/node_modules/drizzle-seed/index.cjs:134673:5)
at async seedFunc (/myApp/node_modules/drizzle-seed/index.cjs:134579:9)
at async DBService.seed (/myApp/dist/src/db/DBService.js:73:13)
Seed error: TypeError: Cannot read properties of undefined (reading 'length')
at /myApp/node_modules/drizzle-seed/index.cjs:131270:50
at Array.every (<anonymous>)
at GenerateValuesFromArray.checks (/myApp/node_modules/drizzle-seed/index.cjs:131270:24)
at GenerateValuesFromArray.init (/myApp/node_modules/drizzle-seed/index.cjs:131312:14)
at SeedService.generateColumnsValuesByGenerators (/myApp/node_modules/drizzle-seed/index.cjs:134363:43)
at SeedService.generateTablesValues (/myApp/node_modules/drizzle-seed/index.cjs:134322:38)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async seedPostgres (/myApp/node_modules/drizzle-seed/index.cjs:134673:5)
at async seedFunc (/myApp/node_modules/drizzle-seed/index.cjs:134579:9)
at async DBService.seed (/myApp/dist/src/db/DBService.js:73:13)


Any help would be appreciated!
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to refine seed data using `with` clause in drizzle seed
Drizzle TeamDTDrizzle Team / help
8mo ago
drizzle-seed
Drizzle TeamDTDrizzle Team / help
13mo ago
Unable to resolve "drizzle-seed"
Drizzle TeamDTDrizzle Team / help
15mo ago
Drizzle-Seed null values
Drizzle TeamDTDrizzle Team / help
12mo ago