Impossible to have Index route working
Hi,
When i use tanstack start, i try to map an index route ('/') but it is not working can someone can help me ?
/app/routes/index.tsx
See screenshot
Available to debug this by discord (complicate to give repo sensitive data in it(
26 Replies
ratty-blush•7mo ago
what does "map an index" mean?
eager-peachOP•7mo ago
I want to create a page with a component who be showned in /
like localhost:3000/
ratty-blush•7mo ago
since the code you posted is the default, the issue must be in the app config or runtime. try comparing against our examples
it could also be that your root route does not render an outlet
eager-peachOP•7mo ago
app.config.ts
__root.tsx
For me it doesn't make any sense
@Manuel Schiller if you have 5 minutes for me I can show you in a Discord callratty-blush•7mo ago
sorry not right now
do other routes work? just not the index?
eager-peachOP•7mo ago
yes others works
just the index doesn't work
ratty-blush•7mo ago
what's the server response? anything or nothing?
eager-peachOP•7mo ago
nothing
ratty-blush•7mo ago
any logs on the server side?
eager-peachOP•7mo ago
nopr
ratty-blush•7mo ago
and did that never work or just recently?
eager-peachOP•7mo ago
Never work since the beginning
ratty-blush•7mo ago
how do you launch? node, bun, ... ?
eager-peachOP•7mo ago
Node
Do you want the router.tree.gen
?
ratty-blush•7mo ago
could help yes
eager-peachOP•7mo ago
routetree gen
eager-peachOP•7mo ago
@Manuel Schiller do you need more code to debug it?
Thing i have observed (I don't know if it help)
If i have an /(app)/route.tsx, when i go to /users (who is present to /(app)/users/index.tsx) it render /index.tsx instead
ratty-blush•7mo ago
route groups in (...) are only meant for grouping things in folders
they are not relevant for nesting etc
so /(app)/route.tsx wont ever be rendered
eager-peachOP•7mo ago
The thing is i want to have /users and /workspace who share same layout and others not
ratty-blush•7mo ago
then you need a pathless route
eager-peachOP•7mo ago
I have already try to do a /(app)/_pathless.tsx doesn't rendered
ratty-blush•7mo ago
ratty-blush•7mo ago
Routing Concepts | TanStack Router React Docs
TanStack Router supports a number of powerful routing concepts that allow you to build complex and dynamic routing systems with ease. Each of these concepts is useful and powerful, and we'll dive into...
eager-peachOP•7mo ago
Okay it works but the bug with localhost:3000 (/index.tsx) still present
still not available for a quick call ?
ratty-blush•7mo ago
dm'ed you
eager-peachOP•7mo ago
I close the issue, As we seen index.html is present in public folder so It render it instead of JS component. Thanks !
Your solution seems not to work I open another issue