Here is the full error message: src/routers/_app.ts:13:14 - error TS2742: The inferred type of 'appRouter' cannot be named without a reference to '../../node_modules/zod/v4/core/util.cjs'. This is likely not portable. A type annotation is necessary.
- I am in a turborepo with a separate frontend and backend apps. - I use tRPC as a package so both back and frontend can have access - I use Zod v4 and have made use of pnpm catalog: in order to keep version consistent across all apps and packages - my db (ORM using Drizzle) is in its own 'db' package again to help with access on both front and back apps - my tRPC context contains db (drizzle), clerk auth context, and the clerk JS client
I don't really understand the issue completely and there's not very much online on this? But it seems to happen a lot in my codebases and I am never sure what I have done to cause it
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
t
tRPC
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.