tRPCttRPC
Powered by
KrangaK
tRPC•2y ago•
1 reply
Kranga

All my mutations are failing due to an empty body after upgrading to 11.0.0-rc.362

TRPCError: JSON Parse error: Unexpected EOF\n    at new TRPCError (/mnt/c/Users/Ángel/IdeaProjects/back/node_modules/.pnpm/@trpc+server@11.0.0-rc.362/node_modules/@trpc/server/dist/unstable-core-do-not-import/error/TRPCError.mjs:51:12)\n    at <anonymous> (/mnt/c/Users/Ángel/IdeaProjects/back/node_modules/.pnpm/@trpc+server@11.0.0-rc.362/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/contentType.mjs:23:30)\n    at processTicksAndRejections (:12:39)
TRPCError: JSON Parse error: Unexpected EOF\n    at new TRPCError (/mnt/c/Users/Ángel/IdeaProjects/back/node_modules/.pnpm/@trpc+server@11.0.0-rc.362/node_modules/@trpc/server/dist/unstable-core-do-not-import/error/TRPCError.mjs:51:12)\n    at <anonymous> (/mnt/c/Users/Ángel/IdeaProjects/back/node_modules/.pnpm/@trpc+server@11.0.0-rc.362/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/contentType.mjs:23:30)\n    at processTicksAndRejections (:12:39)


I have tried debugging in
http/contentType.mjs
http/contentType.mjs
and I found the request body is coming empty even if it shows a body on the browser devtools.

Originally happened after upgrading a lot of rc.xxx versions at once but I pinpointed it on rc.362. The mutation works fine on rc.361 even using rc.364 on the client.

I am using bun as the runtime.
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

After upgrading to 11.0.0-next-beta.300, every request throws zod error
SongkeysSSongkeys / ❓-help
2y ago
TSC errors after upgrading to v11
EvanEEvan / ❓-help
2y ago
No typesafety after migrating to 11?
DiamondDragonDDiamondDragon / ❓-help
3y ago
Type inference issues after upgrading to Typescript 5+
SchnozzleCatSSchnozzleCat / ❓-help
9mo ago