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:
both projects have ts strict mode enabled. the same versions of trpc, and i installed the server package on the client
4 Replies
here is the code that is producing the error:
the backend code is directly copied from one of the examples:
could this have something to do with rootdir?
on the backend, I can export a simple type to the frontend and it works. i can also see the greet property:
however when I import the AppRouter type on the frontend, it appears to be a blank version with no routes
Solution
switching to
createTRPCProxyClient
solved this problem