Emil
Emil2mo ago

Getting type error for AppRouter

Hey. I've set up trpc in my monorepo as per this repo: https://github.com/t3-oss/create-t3-turbo (other auth provider). I am running in to these two type errors on the AppRouter type and haven't been able to solve them: Type 'CreateRouterInner<RootConfig<{ ctx: { db: NeonHttpDatabase<typeof import("/Users/emilqvarfort/Desktop/Projects/moktiv/code/moktiv/packages/db/src/schema/index")> & { $client: NeonQueryFunction<boolean, boolean>; }; token: string; session: { ...; }; user: { ...; } | undefined; }; meta: object; errorShape: { ...; }; t...' does not satisfy the constraint 'Router<any, any>' The types of '_def._config.transformer' are incompatible between these types. Type 'typeof SuperJSON' is missing the following properties from type 'CombinedDataTransformer': input, output Thanks in advance for your help!
GitHub
GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo usin...
Clean and simple starter repo using the T3 Stack along with Expo React Native - t3-oss/create-t3-turbo
No description
No description
No description
3 Replies
dandoen
dandoen5w ago
hey, i'm running into this same exact thing. did you figure it out? EDIT: clearing node_modules did the trick 😬
Emil
EmilOP3w ago
Sorry for late answer... my problem was not having matching versions of trpc on the back end and front end
dandoen
dandoen3w ago
Mine was an old typescript version!

Did you find this page helpful?