TiKevin83
TTCTheo's Typesafe Cult
•Created by TiKevin83 on 11/17/2024 in #questions
tRPC route undefined at runtime
I'm getting a 500 error in my dev environment
[ Server ] Error: Cannot read properties of undefined (reading 'getAllForUser')
for a trpc query I added. It's the same getLatest
query for posts just changed to findMany
instead of findFirst
. I'm struggling to figure out what could make the site compile and have getLatest working but then have getAllForUser
missing at runtime. The site is working fine locally using railway db and discord auth and only breaks once I try to add a component for getting all user books (reworded from the posts example)
Repo public here
https://github.com/TiKevin83/DiveableNext/blob/e664211df268ff843544db98c0baeec9a11f4d2e/src/server/api/routers/book.ts#L292 replies