Invariant failed: Could not find an active match from <route> when DevTools gives match to URL
I'm trying to define a dynamic route segment with code-based routing, but I get this error where the logs say it can't find an active match, but Tanstack Router Dev Tools gives me the expected route component under matches.
Am I missing someting? This is my first time working with Tanstack Router. I can provide further context/code in this thread, if necessary


2 Replies
noble-gold•2mo ago
a complete reproducer would be good, ideally fork one of the existing stackblitz router examples
genetic-orangeOP•2mo ago
I'll use the kitchen-sink example to try to reproduce the problem, one moment
I've diagnosed the issue: I was calling getRouteApi improperly and getting that error because of that. It's fixed now, thanks 🙂