Solid Start: app can't hydrate, `$_TSR is not defined` #5737
Which project does this relate to?#
Start
Describe the bug#
running a basic tanstack start app using the latest version leads to failed hydration with these errors in the console:
(index):61 Uncaught ReferenceError: $_TSR is not defined
at (index):61:81
chunk-IXYHYZCU.js?v=2e68e00e:764
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'done')
at hydrate$1 (chunk-IXYHYZCU.js?v=2e68e00e:764:23)
at hydrate (chunk-IXYHYZCU.js?v=2e68e00e:1136:10)
at virtual:tanstack-start-client-entry:5:3
Your Example Website or App#
https://stackblitz.com/edit/vitejs-vite-drvhegku
Steps to Reproduce the Bug or Issue#
- open the reproduction
- notice how the button doesn't do anything
- observe errors in the console
Expected behavior#
hydration works
Screenshots or Videos#
No response
Platform#
- Router / Start Version: 1.134.9.
- OS: macOS
- Browser: Chrome
- Browser Version: 141
- Bundler: vite
- Bundler Version: 7.1.12
Additional context#
the latest version that seems to be working is 1.133.15, 1.133.17 is already broken i think
this did fix the above issue, but i'm still facing hydration issues :c not sure if i should make another issue about this
the same code that used to work in older versions (1.133.15) doesn't work in the latest version
repro:
- https://stackblitz.com/edit/vitejs-vite-fruk1vxj - broken (latest version)
- https://stackblitz.com/edit/vitejs-vite-rtc1xvz1 - working fine (1.133.15)
this seems to be similar in essence to this issue i faced a while back, but like, it worked fine before i updated start 😭 not sure what the expected behavior should be
Can you change the root to look like the example I posted?
i thought i did? maybe it didn't save the first time.. should be updated here https://stackblitz.com/edit/vitejs-vite-fruk1vxj
I don't think it likes the span like you have here
<span>item {idx}</span>yeah, ryan explained why this happens in the linked issue in the solid repo, this is pretty much the same thing
im just wondering why did it work in older start and stopped now and whether this should be considered a bug/regression or not
birkskyum(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
We changed how the __root document is defined. You can view an example here
https://github.com/TanStack/router/blob/main/examples/solid/start-bare/src/routes/__root.tsx