Skip to content

Default error component does not catch - Failed to fetch dynamically imported module #6107

Description

@eylamk

Which project does this relate to?

Router

Describe the bug

When failed to fetch dynamically imported module error is thrown,
the default error component (defaultErrorComponent in the createRouter) does not catch it.
Then an error is thrown in the console from the routeTree.gen.ts mostly on index.lazy files.

Your Example Website or App

Steps to Reproduce the Bug or Issue

  1. from devtools disable network - set yourself as offline.
  2. hover over a button that navigates to a route.
  3. the error will be thrown.

Expected behavior

As a user I expect that the defaultErrorComponent will catch this error and decide how to handle it, so I will be able to mute/ ignore it/ reload the page.

Screenshots or Videos

Image

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 Dec 16, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples
    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    🔗 Related PRs

    #5647 - test(solid-start): fix dev server for suspense transition [merged]
    #5890 - Fix: Route with server function as loader that throws notFound crashes route on HMR #5763 [merged]

    👤 Suggested Assignees


    🧪 Issue enrichment is currently in early access.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord or schedule a call!

  2. eylamk commented on Dec 30, 2025

    @eylamk
    Author

    anything new guys?

  3. schiller-manuel commented on Dec 30, 2025

    @schiller-manuel
    Collaborator

    does this happen with automatic codesplitting as well?

  4. eylamk commented on Dec 31, 2025

    @eylamk
    Author

    it does not related to automatic codesplitting.
    the error is being thrown from the routeTree.gen.ts on index.lazy files.

  5. schiller-manuel commented on Dec 31, 2025

    @schiller-manuel
    Collaborator

    yes but i want to know if the error is caught if automatic code splitting is used instead of manual lazy?

  6. added a commit that references this issue on Feb 23, 2026
    07bb659
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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions