Skip to content

layout with root id fails without error #13789

@darklight9811

Description

@darklight9811

I'm using React Router as a...

framework

Reproduction

create a react-router framework mode and use a routes file like this:

import { layout, type RouteConfig, route } from "@react-router/dev/routes";

export default [
	route("/", "./routes/page.tsx"),
	layout("./routes/layout.tsx", { id: "root" }, [
		// catch-all
		route("/*", "./routes/not-found.tsx", { id: "not-found" }),
	]),
] satisfies RouteConfig;

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-13620H
    Memory: 21.48 GB / 31.71 GB
  Binaries:
    bun: 1.2.15 - ~\AppData\Local\Temp\bun-node-df017990a\bun.EXE
  Browsers:
    Edge: Chromium (137.0.3296.52)

Used Package Manager

bun

Expected Behavior

To work or at least show that you are not allowed to use layout with id root

Actual Behavior

server hangs without any explanation

Activity

sergiodxa

sergiodxa commented on Jun 11, 2025

@sergiodxa
Member

It should show why you're not allowed.

The reason btw is that app/root.tsx file uses that route id.

github-actions

github-actions commented on Jun 24, 2025

@github-actions
Contributor

🤖 Hello there,

We just published version 7.6.3-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

github-actions

github-actions commented on Jun 27, 2025

@github-actions
Contributor

🤖 Hello there,

We just published version 7.6.3 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sergiodxa@brophdawg11@darklight9811

        Issue actions

          layout with root id fails without error · Issue #13789 · remix-run/react-router