Uncaught ReferenceError: _$HY is not defined

So, I'm trying to change my site to server side rendering. The site runs locally when run via yarn dev, but then I deploy it, I get:
Uncaught ReferenceError: _$HY is not defined
Uncaught ReferenceError: _$HY is not defined
When I check the html that was generated by the server side rendering, I can see:
<script>_$HY.init("0-2-0-0-0-0-1-1-0-0-0-0-1-1-1-0-0-0-1-1-1-0-1-1-1-0");</script>
<script>_$HY.init("0-2-0-0-0-0-1-1-0-0-0-0-1-1-1-0-0-0-1-1-1-0-1-1-1-0");</script>
what is _$HY ? (PS: I did replace import { render } from 'solid-js/web'; with import { hydrate } from "solid-js/web"; and then used hydrate instead of render in my index.tsx, in case thats whats missing)
1 Reply
Bersaelor
Bersaelor2y ago
Apparently i forgot to add the
<HydrationScript />
<HydrationScript />
to the header which caused this error. https://www.solidjs.com/guides/server#hydration-script
SolidJS
Solid is a purely reactive library. It was designed from the ground up with a reactive core. It's influenced by reactive principles developed by previous libraries.
Want results from more Discord servers?
Add your server