Typescript error with Vite + file based routing
I upgraded all my router dependencies but receive typing errors.

13 Replies
other-emeraldOP•13mo ago
I use the router with file based routing and Vite plugin. I don't find any changelog what might could cause this.
fair-rose•13mo ago
Make sure you are importing from
@tanstack/react-router
and not @tanstack/react-router/dist/...
other-emeraldOP•13mo 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

fair-rose•13mo ago
If you can recreate this, I can probably debug this.
other-emeraldOP•13mo ago
Im not sure how to isolate this.. is there template starter for typescript + vite + file based routing?
fair-rose•13mo ago
StackBlitz
Router Quickstart File Based Example - StackBlitz
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz
other-emeraldOP•13mo ago
thx.. i try to isolate it but no luck so far
other-emeraldOP•13mo ago
StackBlitz
Router Quickstart File Based Example - StackBlitz
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz
other-emeraldOP•13mo 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
other-emeraldOP•13mo ago

other-emeraldOP•13mo ago
Is there a tsconfig section out there to see what are the minimum requirements to run the project ?
other-emeraldOP•13mo ago
all of the examples extending a tsconfig.base.json which I dont think is actually part of the repo

other-emeraldOP•13mo ago
ahh I found it.. declaration was set to true which causes it