Closed mgcrea closed 2 months ago
did you test with 1.19.6?
did you test with 1.19.6?
βERR_PNPM_NO_MATCHING_VERSIONβ No matching version found for @tanstack/react-router@^1.19.6
Looks like it's not published?
edit: I do use the 1.19.6 for the vite plugin (if that was the question)
"@tanstack/react-router": "^1.19.4",
"@tanstack/router-vite-plugin": "^1.19.6",
yes that was the question. can you please provide a minimal complete example e.g. by forking one of the existing examples on Stackblitz?
@schiller-manuel https://stackblitz.com/edit/tanstack-router-ddvaja?file=src%2FrouteTree.gen.ts
const LayoutProjectsProjectIdUploadRoute =
LayoutProjectsProjectIdUploadImport.update({
path: '/projects/upload',
getParentRoute: () => LayoutRoute,
} as any)
Is incorrect
This does not work: _$projectId
A layout route cannot have a path parameter.
Why isn't the folder named $projectId
?
This does not work:
_$projectId
A layout route cannot have a path parameter.
Why isn't the folder named
$projectId
?
It used to work fine, if I name it $projectId
I get two matches and I only have projects/$projectId
that is rendered.
In my case I just want a separate page with the base layout and this specific path: /projects/$projectId/upload
(I don't want projects/$projectId
to be rendered at all).
Maybe there is another less convoluted way to achieve this?
what do you mean by "two matches "? what does "base layout" mean?
My "base layout" in my case/tree is the _private.tsx
that looks like:
<PrivateLayout params={params} breadcrumbs={query.data}>
<Outlet />
</PrivateLayout>
So basically I want:
/projects/$projectId
: <PrivateLayout><ProjectPage /></PrivateLayout>
/projects/$projectId/upload
: <PrivateLayout><ProjectUploadPage /></PrivateLayout>
If I drop the underscore, I get the following matches from the debug UI:
Which leads to only the first one (projects/$projectId
) rendering, since it does not have an outlet the second/nested one is skipped.
Before updating, it was working (with the _
) as:
Thanks for your help!
can it be that you are just missing an index route?
move /projects/$projectId.tsx
to /projects/$projectId/index.tsx
can it be that you are just missing an index route?
move
/projects/$projectId.tsx
to/projects/$projectId/index.tsx
Looks like it works π! Thank you for your time and help!
Describe the bug
I'm encountering an issue with a nested param that is incorrectly skipped in the latest release, the newly generated routeTree is incorrect (cf. regression diff below in the generated output):
My routes:
Your Example Website or App
see code above
Steps to Reproduce the Bug or Issue
Expected behavior
Expected the nested param to be properly preserved and not skipped
Screenshots or Videos
No response
Platform
Additional context
No response