Drizzle query not working only inside trpc
My drizzle query works inside a regular nextjs api route. The same query running inside trpc throws an error:
I'm using Cloudflare d1 for database.
I'm using Cloudflare d1 for database.
TRPCClientError: Cannot read properties of undefined (reading 'prepare')
at TRPCClientError.from