Open PhilipAngelinNE opened 1 month ago
I found in https://github.com/drizzle-team/drizzle-orm/issues/2654#issuecomment-2247698796 that this only seems to happen with tsconfig strict mode set to false. Nx does not set it to true, so I turned them on myself and that fixed the issue.
However I have a friend who tried doing the same, and it does still not work for him, so I'll leave this issue open.
seems to be an issue only 0.32+. i downgraded to 0.31.2 and the nullable properties are correctly in the insert type
seems to be an issue only 0.32+. I downgraded to 0.31.2, and the nullable properties are correctly in the insert type
Unfortunately, we ran into an issue with drizzle-kit which requires the latest version. I, too, initially downgraded until we needed to run migrations.
I have spent like an hour trying to fix this issue. I was using v0.33
i tried downgrading to v0.32
but still didn't work. Adding the strict:true
to tsconfig.json
solved the issue for me.
I'm not sure if this is a framework problem, but for me setting "strictNullChecks" to true instead of "strict" did the trick. I'm using NestJS with DrizzleORM v0.33.0
What version of
drizzle-orm
are you using?0.32.1
What version of
drizzle-kit
are you using?0.23.0
Describe the Bug
Here, TS complains that
password
does not exist in the values object. If I add.notNull()
to the password column it works.Expected behavior
In this case,
password
should exist in.values()
.Environment & setup
OS: WSL Ubuntu. TypeScript version: 5.4.5. Node version: 20. Using Nx mono repo with a NestJS app (where the example is used).