Hydration Mismatch. Unable to find DOM nodes for hydration key
I'm trying to setup a SolidJS SSR project with Vite, Fastify, and the
@fastify/vite
plugin. I've finally got something rendering, but am getting this error:
The App
component this is happening in is as basic as you can get:
So basic in fact I'm not sure what there is to mismatch. I know it's not much info to go on but any leads on how to debug this would be appreciated.
P.S. - Even with the error the app renders properly on first render. Subsequent hot updates though are received by the browser but don't change what's rendered.3 Replies
Do you have a repro i can run/debug?
seems like an integration issue with fastify-vite if the error occurs during HMR update
Thanks for the kind offer but it's part of a monorepo and includes references to a lot of internal libraries. It would take too dig out of that monorepo and make the thing a standalone project.
I used that plugin because it was in theory going to be easier to integrate, but it's been a grind for 2 days just to get that thing running, so I may be barking up the wrong tree. If you have any suggestions or know of any resources for integrating SolidJS into a TS/Fastify project I'm all ears. Thanks
I figured it out. The plugin's weak TS support, outdated examples, and lack of error handling made it a bit hard to figure out exactly what it wanted but I got there. Thanks all!