© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•14mo ago•
8 replies
lucasp

im getting problems with drizzle schemas

Hi everyone, I'm having a problem with the schemas, they all work except for
transportistShema
transportistShema
. If I add this one, I get the error
TypeError: Cannot read properties of undefined (reading 'Symbol(drizzle:Schema)')
TypeError: Cannot read properties of undefined (reading 'Symbol(drizzle:Schema)')



import * as giverSchema from './config/schema/cargoGiver.schema'
import * as transportistSchema from './config/schema/transportist.schema'
import * as userSchema from './config/schema/users.schema'

app.get('/', async c => {
  const schema = {
    ...userSchema,
    ...giverSchema,
    ...transportistSchema
  }

  const db = drizzle(c.env.DB, {
    schema
  })

  const res = await db.query.user.findMany({ with: { cargoGiver: true } })
  return c.json(res)
})
import * as giverSchema from './config/schema/cargoGiver.schema'
import * as transportistSchema from './config/schema/transportist.schema'
import * as userSchema from './config/schema/users.schema'

app.get('/', async c => {
  const schema = {
    ...userSchema,
    ...giverSchema,
    ...transportistSchema
  }

  const db = drizzle(c.env.DB, {
    schema
  })

  const res = await db.query.user.findMany({ with: { cargoGiver: true } })
  return c.json(res)
})

if i comment the schema like this, it works and idk why

 const schema = {
    ...userSchema,
    ...giverSchema,
  //  ...transportistSchema
  }
 const schema = {
    ...userSchema,
    ...giverSchema,
  //  ...transportistSchema
  }
Screenshot_from_2024-12-12_14-48-00.png
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

Drizzle client nested schemas
Drizzle TeamDTDrizzle Team / help
2y ago
Share drizzle-zod schemas with the frontend
Drizzle TeamDTDrizzle Team / help
3y ago
Drizzle-zod schemas included in bundle
Drizzle TeamDTDrizzle Team / help
4mo ago
Drizzle studio not recognising new schemas
Drizzle TeamDTDrizzle Team / help
16mo ago