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.
H
hhhyh386d ago
I setup this project by using https://github.com/t3-oss/create-t3-turbo
H
hhhyh386d ago
the autocomplete seems to recognize it
H
hhhyh386d ago
--- ignore for now I think I may have found the issue ----
I
isitayush309d 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.
H
hhhyh309d 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?
I
isitayush309d 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.
H
hhhyh309d ago
what stack are you using trpc with ?
I
isitayush309d ago
T3!
H
hhhyh309d ago
have you tried rebuilding your nextjs backend?
I
isitayush309d 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.
H
hhhyh309d 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 😂
I
isitayush309d 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
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?Hello all, When using pnpm in a TypeScript monorepo without `node-linker`, I hit those errors: ```tRPC standalone server in monorepoHi, I'm using t3-stack monorepo as my base and I've swapped out NextJS backend for standalone HTTP Codemod to v10 is not modifying any fileHello 👋, I must be super dumb but running `pnpm dlx trpc-v10-migrate-codemod ` in my project isn't No overload matches this call when outputting unionsHello there 👋, I have this simple procedure (we're not fully migrated on v10 yet, using interop): [help] Uncaught (in promise) TRPCClientError: Property description must be an object: uAfter building on linux, I visit the site. And Chrome console shows this error. But if I build on myHow can I make tRPC+NextJs APIs faster? (db and functions region is already same)Hi, I have migrated my website backend (https://clubofcoders.com) from NestJs + Prisma + Cloud Run tThrowing fastify errors when using fastify adapterHello, I'm using `fastifyTRPCPlugin` from `@trpc/server/adapters/fastify` and trying to throw errorsConfused about createProxySSGHelpersIf you can use this helper inside of `getServerSideProps` without having `ssr: true` what is the difHow to check if data is being prefetched?What is a method to check if ssg prefetching actually occurs? Through the network tab?How can I access ctx from inside of a procedure?``` const appRouter = t.router({ helloTab: t.procedure.input(z.object({ url: z.string().url() })).Async User Call in `createContext` (context.ts) or in `isAuthed` (in trpc.ts)Hi all! Should I be getting the user in all requests via createContext in the following async call `'req' of undefined in onError of express middlewareI've recently noticed that I get a bunch of errors regarding req object missing in ctx for onError pMutations and Queries in React Contexts causing unexpected behaviorsIn my organization, we recently moved to put all of our mutations/queries into React Contexts and ouCustom error managementHey peeps! I could've sworn I created a GitHub issue about this, but I must've been dreaming, becauscontext questionWhy are the context examples only showing opinionated examples with next/react auth ? Also i find itasync middlewareis it possible to define an async middleware? I want to do something like this but it throws errors The type of the second route of the nested route is neverhttps://github.com/StringKe/nx-mulit-trpc-type-error/blob/main/apps/app1/src/pages/index.tsx#L12errorFormatter ignored when using appRouter.createCallerMy errorFormatter works correctly in the actual application using an adapter, e.g. ``` trpcExpress.Is there a way to define the Websocket protocol when using wsLink()I am attempting to use tRPC with Azure's Pub/Sub Websockets service it appears to require custom proThe inferred type of this node exceeds the maximum length the compiler will serialize.Hey, there I am running into this error when I have more than 12 routers in the mergeRouters functio