TanStackT
TanStack5w ago
2 replies
military-pink

Pathless layout issue

I am currently trying to create a pathlessLayout file for the majority of my application. I have a routeFilePrefix of ~ and I am using file based routing

Here's my file tree
packages/web-app/src/routes
├── ~__root.tsx
├── ~_app_chrome (this contains all my routes)
├── ~_app_chrome.tsx


Whenever I try to navigate to any route I get Invariant failed: Could not find an active match from "/" (or whatever route I'm on)

Its like the router doesn't realize that ~app_chrome is a pathless layout because on my other route files, the routes are all prepending the layout path like so: createFileRoute('/_app_chrome/whatever-route/')

What can I do to fix this and what do we think the issue is?
Was this page helpful?