TypeScript error in monorepo suddenly appearing

I have the following Drizzle statement:
const res = await db
.select()
.from(users)
.leftJoin(usersCompaniesRole, eq(users.id, usersCompaniesRole.userId))
.leftJoin(company, eq(usersCompaniesRole.companyId, company.id))
.leftJoin(roles, eq(usersCompaniesRole.roleId, roles.id));
const res = await db
.select()
.from(users)
.leftJoin(usersCompaniesRole, eq(users.id, usersCompaniesRole.userId))
.leftJoin(company, eq(usersCompaniesRole.companyId, company.id))
.leftJoin(roles, eq(usersCompaniesRole.roleId, roles.id));
Which has started giving me this TS error for the arguments passed to the eq functions:
Type 'import("/mg-monorepo/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/drizzle-orm/sql/sql").SQL<unknown>' is not assignable to type 'import("/mg-monorepo/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/drizzle-orm/sql/sql").SQL<unknown>'.
Type 'import("/mg-monorepo/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/drizzle-orm/sql/sql").SQL<unknown>' is not assignable to type 'import("/mg-monorepo/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/drizzle-orm/sql/sql").SQL<unknown>'.
I have a db package and an app package. Both are using the same version of Drizzle (0.30.7) Can someone please help me work out what is causing this?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server