Skip to content

[Bug]: Hydration failed error on HMR code update in TanStack Start #6556

@Alan-aj

Description

@Alan-aj

Which project does this relate to?

Start

Describe the bug

Hi, in a TanStack Start project, when I am updating code during development triggers a hydration failure. While the change is reflected immediately via Hot Module Replacement, a subsequent manual browser reload results in a "Hydration failed" error. The issue persists until the dev server is stopped and restarted.

Your Example Website or App

https://github.com/Alan-aj/tanstack-start

Steps to Reproduce the Bug or Issue

  1. Initialize a project using the TanStack Start Starter Template.
  2. Run the development server.
  3. Modify a component (e.g., change text) and save.
  4. Observe the change reflecting in the browser via HMR.
  5. Manually reload the browser page.
  6. Check the console for the following error
    Uncaught Error: Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used: ...

Expected behavior

Should reload without errors

Screenshots or Videos

Image

Platform

  • Router / Start Version: 1.157.17
  • OS: Windows, Linux
  • Browser: Chrome
  • Browser Version: 144.0.7559.110
  • Bundler: Vite
  • Bundler Version: 7.3.1

Additional context

Image Image

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