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
I setup this project by using https://github.com/t3-oss/create-t3-turbo
the autocomplete seems to recognize it
--- ignore for now I think I may have found the issue ----
Hey @hhhyh, I know this is late but what was the issue? I've encountered a similar issue so hope I find something here.
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?
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
.what stack are you using trpc with ?
T3!
have you tried rebuilding your nextjs backend?
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.
glad to hear! yeah sometimes it just does that, but the old trick of turning it off and on again seems to fix it 😂
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!🫡