#Error: Unexpected Server Error (Error message after deploy)
1 messages · Page 1 of 1 (latest)
so something isn't matching between server and client render. One of the things that I've seen cause something like local working ok, and prod not, is stuff like locale or timezone differences. so like if you render a date/time in one timezone on the server, and then the client renders another it can cause hydration to throw an error like that. Also would explain why it works locally because things like timezone and locale will naturally match.
So some approaches to fix that would be to push things like the client tz to the server like in a cookie so that the server can render the date/times per client preference. (see ClientHints approach here: https://www.epicweb.dev/tips/use-client-hints-to-eliminate-content-layout-shift
another approach would be to push the rendering as client only. (see remix-utils clientOnly component).
Okee thanks