T
TanStack16mo ago
ratty-blush

Typescript error with Vite + file based routing

I upgraded all my router dependencies but receive typing errors.
No description
13 Replies
ratty-blush
ratty-blushOP16mo ago
I use the router with file based routing and Vite plugin. I don't find any changelog what might could cause this.
harsh-harlequin
harsh-harlequin16mo ago
Make sure you are importing from @tanstack/react-router and not @tanstack/react-router/dist/...
ratty-blush
ratty-blushOP16mo ago
this is the entire file.. I guess its some tsconfig setting of Typescript? But I can't really tell, I am using the latest version 5.5.4
No description
harsh-harlequin
harsh-harlequin16mo ago
If you can recreate this, I can probably debug this.
ratty-blush
ratty-blushOP16mo ago
Im not sure how to isolate this.. is there template starter for typescript + vite + file based routing?
harsh-harlequin
harsh-harlequin16mo ago
StackBlitz
Router Quickstart File Based Example - StackBlitz
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz
ratty-blush
ratty-blushOP16mo ago
thx.. i try to isolate it but no luck so far
ratty-blush
ratty-blushOP16mo ago
now i did.. so it has something to do with my typescript i removed tsconfig.dev.json and ported all my tsconfig.json into the stackblitz, then immideately i see the error
ratty-blush
ratty-blushOP16mo ago
No description
ratty-blush
ratty-blushOP16mo ago
Is there a tsconfig section out there to see what are the minimum requirements to run the project ?
ratty-blush
ratty-blushOP16mo ago
all of the examples extending a tsconfig.base.json which I dont think is actually part of the repo
No description
ratty-blush
ratty-blushOP16mo ago
ahh I found it.. declaration was set to true which causes it

Did you find this page helpful?