Next.js Discord

Discord Forum

tRPC keeps failing in turborepo

Answered
Rhinelander posted this in #help-forum
Open in Discord
RhinelanderOP
I have 2 apps (app - next.js frontend and api - next.js backend) and 1 package - trpc.

I am getting typesafety I need but am not getting data from the trpc -
Cannot read properties of undefined (reading 'useQuery')


Related code snippets from my app that could be causing the error: https://gist.github.com/jan-arnez/d99cdf718b4b987d13c2d632e0a10cb6
Answered by Pacific sand lance
View full answer

3 Replies

Pacific sand lance
Answer
Pacific sand lance
they use trpc with different apps
so you can see what are you doing wrong