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.
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_hkhydration key that the client never claims:The script itself executes normally.
title/meta/linkentries from the samehead()are claimed; onlyscriptsentries are left over. Removing thescriptsentry 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'sshellComponent.Versions:
@tanstack/solid-start/@tanstack/solid-router2.0.0-rc.0,@tanstack/router-core1.171.16, solid-js /@solidjs/web2.0.0-rc.0, vite 8.2.1, vite-plugin-solid 3.0.0-next.27.