T
tRPC

❓-help

Drizzle query not working only inside trpc

VVI2/4/2024
My drizzle query works inside a regular nextjs api route. The same query running inside trpc throws an error:
TRPCClientError: Cannot read properties of undefined (reading 'prepare')
at TRPCClientError.from
TRPCClientError: Cannot read properties of undefined (reading 'prepare')
at TRPCClientError.from
I'm using Cloudflare d1 for database. my bad!! cloudflare works only on the edge runtime. forgot to update.
Nnlucas2/4/2024
There we go! Had a feeling it was something silly and unobvious

Looking for more? Join the community!