docD
tRPC3y ago
18 replies
doc

TRPCClientError: Unexpected end of JSON input

Hey I am running into this issue when calling a mutateAsync in production in Vercel (the error does not appear in localhost dev mode).

TRPCClientError: Unexpected end of JSON input

My code base is so large that I am not sure where do I start to debug. Are there any best practices that I should follow to avoid this error?

It is similar to this issue: https://github.com/trpc/trpc/discussions/1847#discussioncomment-4244990
GitHub
When trying to build my Next.js project, I'm getting the following error: TRPCClientError: request to http://localhost:3000/api/trpc/post.test?batch=1&input=%7B%220%22%3A%7B%22json%...
Error "TRPCClientError: request failed" when building a Next.js app...
Was this page helpful?