Skip to content

_root.tsx missing notFoundComponent => error message #5757

Closed

Description

@myoussef3030

Which project does this relate to?

Router

Describe the bug

__root.tsx is missing notFoundComponent => error message
adding the following code to __root.tsx removes the error message:

notFoundComponent: () => {
	return <p>This page doesn't exist!</p>;
},

Your Example Website or App

localhost.com

Steps to Reproduce the Bug or Issue

error appears as soon as app starts

Expected behavior

Error message to disappear:

Warning: A notFoundError was encountered on the route with ID "root", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (

Not Found
)

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.121.0]
  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Browser Version: [e.g. 91.1]
  • Bundler: [e.g. vite]
  • Bundler Version: [e.g. 7.0.0]

Additional context

No response

Activity

  1. coderabbitai commented on Nov 5, 2025

    @coderabbitai
    Contributor

    A summary of the changes CodeRabbit can apply:

    • Confirm the warning is intentional (not a bug), recommend documenting/closing the issue, and apply a typo fix by replacing (<div>Not Found<div>) with (<div>Not Found</div>) in packages/react-router/src/renderRouteNotFound.tsx and packages/solid-router/src/renderRouteNotFound.tsx.

    • Update packages/react-router/src/renderRouteNotFound.tsx and packages/solid-router/src/renderRouteNotFound.tsx to fix a typo in the development warning message by replacing the malformed HTML snippet "

      Not Found
      " with the correct "
      Not Found
      ", so the warning shows valid markup.

    • ✅ Create PR with these edits
    • 📋 Get copyable edits
  2. schiller-manuel commented on Nov 22, 2025

    @schiller-manuel
    Collaborator

    this error most likely comes from the browser trying to load non existing stuff like https://gebna.gg/blog/annoying-well-known-appspecific-com-chrome-devtools-json-request

    then a not-found page will be rendered that needs a not found component.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions