Path undefined error when using multiple flat layouts #1206
-
I'm trying to setup some flat layouts so that I can have layouts for the marketing section and app section of my site, just like the example in the docs - https://remix.run/docs/en/v1/api/conventions#flat-layout-routes I can create a single flat layout file just fine. But as soon as I create the second layout file, I get the following error:
I've created a fresh remix app to make sure it wasn't something funky I was doing, but the problem still persists. My file structure is as follows (I've ommited the default remix files as I haven't touched them):
The contents of the files are: // routes/__app/dashboard.tsx
export default function Dashboard() {
return (<h1>Dashboard</h1>);
} // routes/__app.tsx
import { Outlet } from "remix";
export default function AppLayout() {
return (<Outlet />);
} // routes/__marketing/index.tsx
export default function Index() {
return (<h1>Index</h1>);
} // routes/__marketing.tsx
import { Outlet } from "remix";
export default function MarketingLayout() {
return (<><Outlet /></>);
} I've kept them as basic as possible. What am I doing wrong? Any help would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Can confirm the behavior with latest Node 14, 16 and 17 This seems to be a bug to me, probably somewhere in this file (maybe the comment is right and there should be some tests added^^) |
Beta Was this translation helpful? Give feedback.
-
Looks like an issue and potential fix have been put in 🙏 |
Beta Was this translation helpful? Give feedback.
Looks like an issue and potential fix have been put in 🙏