Skip to content

Solid Start 2.0.0-rc.0: a head() scripts entry is SSR’d with a hydration key that is never claimed #8107

Description

@TylerRick

Reproducer: https://github.com/TylerRick/tanstack-solid-head-scripts-repro (pnpm install && pnpm dev, then open the page with the browser console visible)

A script declared through a route's head() is server-rendered with an _hk hydration key that the client never claims:

Hydration completed with 1 unclaimed server-rendered node(s):
  <script _hk="0000010101149d40">window.__headScriptRan = true;</script>

The script itself executes normally. title / meta / link entries from the same head() are claimed; only scripts entries are left over. Removing the scripts entry clears the warning, and adding a second script produces a second unclaimed node.

Nothing else breaks in the reproducer — the body hydrates and stays reactive — but unclaimed-node warnings are how genuine hydration desyncs surface in Solid, so a permanent benign one is easy to start ignoring.

Workaround: render inline head scripts as direct JSX inside <head> in the root route's shellComponent.

Versions: @tanstack/solid-start / @tanstack/solid-router 2.0.0-rc.0, @tanstack/router-core 1.171.16, solid-js / @solidjs/web 2.0.0-rc.0, vite 8.2.1, vite-plugin-solid 3.0.0-next.27.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions