Xeno
Xeno
Explore posts from servers
DTDrizzle Team
Created by Xeno on 4/5/2024 in #help
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?
1 replies
TtRPC
Created by Xeno on 5/15/2023 in #❓-help
Does tRPC work with Clerk and Vercel Edge functions?
So the answer is yes, at least locally, but I when I deploy to Vercel I get nothing. Trying to work out whether this is happening at the tRPC, Clerk, Vercel, or Planetscale integration level. Anyone experiences something similar?
4 replies