hhhyh
hhhyh14mo ago

TRPCClientError - No "query"-procedure on path "user.all"

Im using react native expo, prisma, trpc and the postgres database is on railway I have run the following commands: npx prisma generate and pnpm db-push so its up to date. attached in the screenshots is the code for the routes, user model in prisma, and error messages. Not sure why it cant recognise the user.all or the user.byId path ? Interesting is that the failureReason is null the first time then after that it is for the above error message in the title of the post.
12 Replies
hhhyh
hhhyh14mo ago
I setup this project by using https://github.com/t3-oss/create-t3-turbo
hhhyh
hhhyh14mo ago
the autocomplete seems to recognize it
hhhyh
hhhyh14mo ago
--- ignore for now I think I may have found the issue ----
isitayush
isitayush12mo ago
Hey @hhhyh, I know this is late but what was the issue? I've encountered a similar issue so hope I find something here.
hhhyh
hhhyh12mo ago
Hey @isitayush , I can't remember exactly how I fixed it but normally when I get that error it is due to me not rebuilding my nextjs backend which has the updated files in it. So I just run: next build and that usually fixes it. What is the error that you're getting?
isitayush
isitayush12mo ago
Similar error, TRPCClientError: No "query"-procedure on path "myRouter.procedure". It worked fine when I added it for the first time although I'm not sure what change I made that caused it to error like that. Other procedures work fine and autocomplete seems to recognize this procedure although it errors out on console. I didn't make any change that could induce such an error. Even verified via git status.
hhhyh
hhhyh12mo ago
what stack are you using trpc with ?
isitayush
isitayush12mo ago
T3!
hhhyh
hhhyh12mo ago
have you tried rebuilding your nextjs backend?
isitayush
isitayush12mo ago
Trying it. rm rf the modules and .next and restart the dev server! A moment. Ah, It worked ^_^!! It was very strange though. I'm unsure what caused it.
hhhyh
hhhyh12mo ago
glad to hear! yeah sometimes it just does that, but the old trick of turning it off and on again seems to fix it 😂
isitayush
isitayush12mo ago
Aahah 😂, Should've done it before bothering here. I was almost out of breath since this thread is 2.9 months old. Thank you so much hhhyh!🫡
More Posts