Sem
ReferenceError: __filename is not defined in ES module scope
I've created an app using solid-start and sucessfuly hosting it on my windows PC with no issue.
But then I decided to change host to my Rasberry Pi 4 running ubuntu server.
Everything went fine and I've managed to build my app again just like on Windows machine
(environment is the same on both machine - node.js 20.8.10, npm 10.1)
Build messages are the same, everything goes fine. I'm even able to run dev server on my Pi and connect to it.
But when I run
solid-start build
and then solid-start start
I'm getting this message:
1 replies
How to handle hydration on client side?
I'm using localstorage to save my local items. Component renders on server if I press F5 and throws an hydration error and it's logically, because server component doesn't have an elements from client sides and it's handled by
isServer
.
But main question: how do I handle this hydration error? How can I manage to synchronize states between server & client?19 replies