Songkeys
Songkeysā€¢11mo ago

After upgrading to 11.0.0-next-beta.300, every request throws zod error

I didn't do anything but upgrading the trpc, and the error throws:
{"issues":[{"code":"invalid_type","expected":"object","received":"undefined","path":[],"message":"Required"}],"name":"ZodError"}
{"issues":[{"code":"invalid_type","expected":"object","received":"undefined","path":[],"message":"Required"}],"name":"ZodError"}
Rollbacking to 11.0.0-next-beta.178 solves.
No description
15 Replies
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢11mo ago
hmm could you check with .299?
Songkeys
SongkeysOPā€¢11mo ago
it's the same do i need to do binary divisions to find the problematic version lol .297 still has problem .260 still .222 good .240 good
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢11mo ago
i just tried upgrading to .300 myself on a massive project and it worked fine with an extensive e2e suite it might be this? https://trpc.io/docs/migrate-from-v10-to-v11#transformers-are-moved-to-links-breaking
Songkeys
SongkeysOPā€¢11mo ago
i found the problem but i don't know how to fix the version with this problem make my api url like this:
http://localhost:3000/api/trpc/nodes.many?batch=1&input=%7B%220%22%3A%7B%22limit%22%3A20%7D%7D
http://localhost:3000/api/trpc/nodes.many?batch=1&input=%7B%220%22%3A%7B%22limit%22%3A20%7D%7D
while the correct one is:
http://localhost:3000/api/trpc/nodes.many?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22limit%22%3A20%7D%7D%7D
http://localhost:3000/api/trpc/nodes.many?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22limit%22%3A20%7D%7D%7D
yes it looks like superjson's problem https://github.com/RSS3-Network/Explorer/blob/5567322395d862623bc9baaff2a95a80c2af8e01/src/lib/trpc/provider.tsx#L90 I think I have it configured correctly because there is no typescript error
Songkeys
SongkeysOPā€¢11mo ago
correct one vs. problematic one
No description
Songkeys
SongkeysOPā€¢11mo ago
.251 bad so it's b/w .240 ~ .251 lemme try .248 .248 good okay it starts from .249
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢11mo ago
probably to do with the transformers moving but you should have typescript errors to guide you what to do
Songkeys
SongkeysOPā€¢11mo ago
are you able to locate the commit so that we know what's introduced
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢11mo ago
it's a bit of a pain b/c it's auto-released on the branch without a git tag etc
Songkeys
SongkeysOPā€¢11mo ago
omg it has type error
No description
Songkeys
SongkeysOPā€¢11mo ago
sorry i think the IDE just too lazy to check while i keep updating the deps
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢11mo ago
cool, yeah this was the one that triggered .249 so it makes sense https://github.com/trpc/trpc/pull/5414
GitHub
chore(breaking): mv transformer from createTRPCClient() to links ...
Closes # šŸŽÆ Changes What Breaking change. This moves transformers: from createTRPCClient() to links This will enable us to add support for tupleson without affecting createTRPCClient - it'll ju...
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢11mo ago
gtg
Songkeys
SongkeysOPā€¢11mo ago
it actually has a really good type error hint
No description
Songkeys
SongkeysOPā€¢11mo ago
thank you so much let me try fix it it works! thank you Alex! ā¤ļø

Did you find this page helpful?