T
TanStack3mo ago
optimistic-gold

`$` route is not found

my tree is
routes/
__root.tsx
index.tsx
project.$projectId.tsx
routes/
__root.tsx
index.tsx
project.$projectId.tsx
4 Replies
optimistic-gold
optimistic-goldOP3mo ago
here's the routeTree.gen.ts
optimistic-gold
optimistic-goldOP3mo ago
optimistic-gold
optimistic-goldOP3mo ago
No description
optimistic-gold
optimistic-goldOP3mo ago
i think i know why it happens i am using a monorepo (turborepo) and i am using router in the component, so every additional /blabla/blabla is specific to this component. that component is called Studio and it is under /packages folder. However localhost is a vite app with the only / route and it does not understand what /project/123 is, so it's the client freaking out. to fix it i need to mount my Studio component in an app, in a route where app does not care what goes after /, like in nextjs /[[...segments]]/ and the component would read the url to handle the navigation i guess that's what i shall go https://tanstack.com/router/latest/docs/framework/react/routing/routing-concepts#splat--catch-all-routes

Did you find this page helpful?