type error in the router.tsx
Hi. Anyone had experienced this and were able to fix?

12 Replies
harsh-harlequin•9mo ago
what does the type error say?
stormy-gold•9mo ago
I believe I also have this. Posting so I remember replying later
harsh-harlequin•9mo ago
I saw this when you did not have the correct router context defined via
createRootRouteWithContext
it must have a queryClient
extended-salmonOP•9mo ago
I will check if it is related to createRootRouteWithContext. Thanks!
stormy-gold•9mo ago
TS error:

harsh-harlequin•9mo ago
please show your root route
stormy-gold•9mo ago
Ahh, I see. I was not using
createRootRouteWithContext()
harsh-harlequin•9mo ago
can you please create a GitHub issue so that this will give a better error message?
maybe we need a lint rule? or just some custom TS error that is attached at the end of the error you posted above
stormy-gold•9mo ago
Is this Router or Start?
harsh-harlequin•9mo ago
start
or rather a start "addon"
TBH it does not really matter in that issue...
stormy-gold•9mo ago
GitHub
Unclear TypeScript error when `routerWithQueryClient(router, queryC...
Which project does this relate to? Router Describe the bug Using routerWithQueryClient(router, queryClient) without using createRootRouteWithContext() in __root.tsx leads to an unclear TypeScript e...
extended-salmonOP•9mo ago
Thanks for posting this. Yes, this is what I get.