tRPCttRPC
Powered by
rikR
tRPC•2y ago•
3 replies
rik

Zod.enum makes my tRPC explode

I'm having an issue with what appears to be circular dependencies. My problem is that I'm not sure what is being parsed that is causing the issue. I don't see a circular dependency. I think that the error message is not indicating the problem line correctly, as I just added more debug to the file and the error message didn't change.

Is there a way to switch on more debug logging in v10 on the server side, so that I can see what's happening more?

The error message:
⨯ TypeError: Cannot read properties of undefined (reading 'parseAsync')
at getParseFn (file:///C:/repos/automation/automate/node_modules/@trpc/server/dist/index.mjs:190:23)
at Object.input (file:///C:/repos/automation/automate/node_modules/@trpc/server/dist/index.mjs:357:28)
at eval (webpack-internal:///(api)/./src/server/api/routers/usbDeviceControl.ts:20:79)

The marker for that last line doesn't seem to change with the content of the file.

How do I go about finding what's undefined here?
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

TRPC & Zod Logging
josephJjoseph / ❓-help
3y ago
how to handle error from Zod in trpc?
MarMMar / ❓-help
3y ago
Make tRPC return Bad Request on Zod validation error?
ApteryxAApteryx / ❓-help
3y ago