tRPCttRPC
Powered by
scrubbuddyS
tRPC•2y ago•
7 replies
scrubbuddy

Types not being shared with the frontend

Hello,

I am currently trying to follow a guide to setup a new project and encountering this error in the client:
Property 'greet' does not exist on type 'TRPCClient<CreateRouterInner<RootConfig<{ ctx: { event: APIGatewayProxyEvent; apiVersion: string; user: string | undefined; }; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>, { ...; }>>'.ts(2339)
Property 'greet' does not exist on type 'TRPCClient<CreateRouterInner<RootConfig<{ ctx: { event: APIGatewayProxyEvent; apiVersion: string; user: string | undefined; }; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>, { ...; }>>'.ts(2339)


both projects have ts strict mode enabled. the same versions of trpc, and i installed the server package on the client
Solution
switching to
createTRPCProxyClient
createTRPCProxyClient
solved this problem
Jump to solution
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

[Help] Turbo shared types
typedefTtypedef / ❓-help
3y ago
Unable to get mutation to trigger subscription because EventEmitter not being shared
boneyBboney / ❓-help
3y ago
How to get access to the types generated by the server in the frontend (React)?
Alan_sztAAlan_szt / ❓-help
2y ago