Which project does this relate to?
Start
Describe the bug
A script declared through a route's head() is server-rendered with an _hk hydration key that the client never claims, so every page load logs:
Hydration completed with 1 unclaimed server-rendered node(s):
<script _hk="0000010101149d40">window.__headScriptRan = true;</script>
The script itself works — it executes at parse time. title / meta / link entries from the same head() are claimed normally; only scripts entries are left over, one unclaimed node per script.
Nothing downstream breaks in the reproducer (the body hydrates and stays reactive), so this is cosmetic on its own. It matters because unclaimed-node warnings are how real hydration desyncs surface in Solid — a permanent benign one trains you to ignore the signal.
Complete minimal reproducer
https://github.com/TylerRick/tanstack-solid-head-scripts-repro
Steps to Reproduce the Bug or Issue
pnpm install
pnpm dev
- Open http://localhost:5587 with the browser console visible — the warning above is there on load.
- Controls, both in
src/routes/__root.tsx: delete the scripts entry and the warning goes away; add a second script and there are two unclaimed nodes.
Expected behavior
Head scripts are either claimed at hydration like the other head entries, or rendered without a hydration key — so an app that uses head().scripts doesn't report unclaimed server-rendered nodes on every load.
Screenshots or Videos
No response
Platform
- Router / Start Version:
@tanstack/solid-start and @tanstack/solid-router 2.0.0-rc.0, @tanstack/router-core 1.171.16
- solid-js /
@solidjs/web: 2.0.0-rc.0
- OS: Linux
- Browser: Chromium 141
- Bundler: vite 8.2.1 (vite-plugin-solid 3.0.0-next.27)
Additional context
Workaround we're using: render inline head scripts as direct JSX inside <head> in the root route's shellComponent instead of declaring them through head().
Which project does this relate to?
Start
Describe the bug
A script declared through a route's
head()is server-rendered with an_hkhydration key that the client never claims, so every page load logs:The script itself works — it executes at parse time.
title/meta/linkentries from the samehead()are claimed normally; onlyscriptsentries are left over, one unclaimed node per script.Nothing downstream breaks in the reproducer (the body hydrates and stays reactive), so this is cosmetic on its own. It matters because unclaimed-node warnings are how real hydration desyncs surface in Solid — a permanent benign one trains you to ignore the signal.
Complete minimal reproducer
https://github.com/TylerRick/tanstack-solid-head-scripts-repro
Steps to Reproduce the Bug or Issue
pnpm installpnpm devsrc/routes/__root.tsx: delete thescriptsentry and the warning goes away; add a second script and there are two unclaimed nodes.Expected behavior
Head scripts are either claimed at hydration like the other head entries, or rendered without a hydration key — so an app that uses
head().scriptsdoesn't report unclaimed server-rendered nodes on every load.Screenshots or Videos
No response
Platform
@tanstack/solid-startand@tanstack/solid-router2.0.0-rc.0,@tanstack/router-core1.171.16@solidjs/web: 2.0.0-rc.0Additional context
Workaround we're using: render inline head scripts as direct JSX inside
<head>in the root route'sshellComponentinstead of declaring them throughhead().