### Which project does this relate to? Router ### Describe the bug This bug appeared after updating to latest version (`1.112.17`) Where calling the navigate function returned by `routeApi.useNavigate()` without a `from` & `to` params would throw an error in the console: ``` Uncaught Error: Invariant failed: Could not find match for from: /_post/post/$id ``` Check the code reproduction below ### Your Example Website or App https://stackblitz.com/edit/tanstack-router-8a83jilz?file=src%2Froutes%2F_post.post.%24id.tsx ### Steps to Reproduce the Bug or Issue Go to the `/post/1` page & click on the 'Update filters' button & check the console. ### Expected behavior I would expect this to work as it used to, renavigating to the same page with the new search params or params. ### Screenshots or Videos _No response_ ### Platform - OS: Linux - Browser: Chrome - Version: 1.112.17 ### Additional context _No response_
Activity
lhilgert9 commentedon Mar 6, 2025
I have the same problem. It should have been introduced in version 1.112.15 respectively #3671.
schiller-manuel commentedon Mar 6, 2025
yeah the mentioned change is not working for pathless routes. need to use fullPath instead of id I think
fix: use `fullPath` as `from` in Route/RouteApi `useNavigate`
fullPath
asfrom
in Route/RouteApiuseNavigate
#3684fix: use `fullPath` as `from` in Route/RouteApi `useNavigate`
fix: use `fullPath` as `from` in Route/RouteApi `useNavigate` (#3684)
fix: use `fullPath` as `from` in Route/RouteApi `useNavigate` (TanSta…
Dharmang92 commentedon Apr 16, 2025
Still facing this issue in latest version 1.115 and 1.116, even after the fixes. Can you please check again?
The error is logged directly in console with no specific steps. Just use useNavigate to redirect.
schiller-manuel commentedon Apr 16, 2025
@Dharmang92 can you please open a new issue and include a minimal complete example?
Dharmang92 commentedon Apr 17, 2025
@schiller-manuel Please check: #4010
I have added a reproducible in the issue. Let me know if you need more details.