Type error when using `drizzle-zod` with sqlite table schema
I'm trying to do this:
My table is:
I get a type error on my input to
createSelectSchema
.
Is drizzle-zod
Postgres only or something?4 Replies
what's your Zod and
drizzle-zod
versions?
@Shroomall latest
okay hmm
so i decided to try using it in a schema anyway

it works with one table. not with another
the
card
one (the one that works) is this:
done further digging. it was the wrong card
schema in that example lmao, so that's why it didn't show the error
if i pull my entire schema into the file where i use the zod schema (which is in a different workspace), it's fine
but in my worker (where my schema is currently defined, because it's used in a DO) it doesn't work. just moving the definitions to a different workspace leads to totally different results
Okay I've kind of figured out
Don't know the exact cause still
But I had a bit of a mess with all my node_modules
. I removed all of them (from all my workspaces), typed bun i
, and then it worked and there were now no type issues
Presumably some of them had like old versions of drizzle-orm
that caused these issues?