-
-
Notifications
You must be signed in to change notification settings - Fork 234
Description
Drizzle throws SQL type conflict
I'm consistently getting this TypeScript error whenever I try to join two tables using Drizzle ORM:
Argument of type 'SQL<unknown>' is not assignable to parameter of type 'SQL<unknown> | ...'.
Type '.../[email protected]+49c6d5e2b5ce5aad/.../SQL<unknown>' is not assignable to type '.../[email protected]+cc127fb80b35d2e5/.../SQL<unknown>'.
Types have separate declarations of a private property 'shouldInlineParams'.
The error points to two different internal build hashes of Drizzle:
- 0.45.0+49c6d5e2b5ce5aad
- 0.45.0+cc127fb80b35d2e5
This means that Drizzle is being installed more than once inside node_modules, causing TypeScript to treat them as different types even though the versions are the same. Because the SQL class contains private fields, TypeScript sees them as incompatible, triggering the error.
even though I didn't install it again, everything is default from the template
Temporary Fix
If I run the following:
rm -rf node_modules bun.lockb
bun install
…the issue disappears—until it eventually comes back again.
Project Setup
This project was created using:
bun create better-t-stack@latest looks-good --frontend solid --backend hono --runtime bun --api orpc --auth better-auth --payments none --database mysql --orm drizzle --db-setup docker --package-manager bun --no-git --web-deploy none --server-deploy none --install --addons turborepo --examples todo
Question
Why is Bun repeatedly installing multiple internal builds of Drizzle ORM?
Is this caused by transitive dependencies, Turborepo workspaces, or something ?
Any guidance on how to prevent duplicate Drizzle installations from being generated would be appreciated.