You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
oRPC v2 router: traverseContractProcedures is not a function #238
Expected: a create-post command with --title and --tags, as with @orpc/server 1.16.6. We ran the same code on 1.16.6 and it works.
Actual:
TypeError: traverseContractProcedures is not a function
at parseOrpcRouter (trpc-cli/dist/parse-router.js:130:24)
What we found in oRPC v2:
@orpc/server no longer exports traverseContractProcedures or isProcedure. walkProcedureContractsSync is in the export list, and it looks like the closest match.
The procedure definition has inputSchemas?: AnySchema[] in place of inputSchema, so contract['~orpc'].inputSchema is undefined.
createCli({ router }) also fails the type check: the v2 router does not match the router type in TrpcCliParams, so TypeScript falls through to the TrpcCliModuleParams overload.
The peer range is @orpc/server: ^1.0.0, so pnpm reports an unmet peer.
We know v2 is still a beta. We think a v2 code path in parseOrpcRouter would fix it: walk the procedures with walkProcedureContractsSync and read inputSchemas[0]. We have not tested this.
Workaround we use for now: re-wrap each procedure as a norpc procedure. It works for a flat router. It is a sketch, not a patch:
Activity
pullfrog commentedon Nov 25, 2026