How to debug and find whats causing the Hydration error?
Answered
American Kestrel posted this in #help-forum
American KestrelOP
I get hydration errors and errors that say -
I end up spending a lot of time trying to find out what's causing that. How to fix these easily
Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.
I end up spending a lot of time trying to find out what's causing that. How to fix these easily
Answered by DirtyCajunRice | AppDir
you are making changes that are client only data in an SSR component
28 Replies
write better code? read the error? this question isnt answerable
American KestrelOP
New to this. Learning as I go.
The issue is the error tells me little about whats causing it
The issue is the error tells me little about whats causing it
isnt there a debugger or something I could use to atleast know what file or component, if not line number
the error literally almost always says exactly that
you just need to read all of it
American KestrelOP
Yeah
its the same error each time
no, but in all the lines that follow
are not files of code I wrote
are not files of code I wrote
its referencing npm packages etc.
then you are either too far up or too far down the stack trace
American KestrelOP
How can I use the stack trace
to help me debug
is there something I should be looking for in it
It just looks like a lot of scary word vomit to me;-;
by… reading it… haha. you will need to post an actual full error for me to point it out
just takes getting used to knowing what to look for
American KestrelOP
Cool
I'll get back to this thread the next time I see one!
I'll get back to this thread the next time I see one!
Thanks so much
Can we leave this thread open a little longer
Can we leave this thread open a little longer
im sure m gonna get one soon
its normally better to open a new thread
American KestrelOP
Ok, will tag you to lyk
American KestrelOP
Got it again!
@DirtyCajunRice | AppDir
If these tell you anything, please lmk
I'm confused here.
Sent pictures of all 3 hydration errors
Dont know how to fix them, as Idk where they are
Sent pictures of all 3 hydration errors
Dont know how to fix them, as Idk where they are
yeah the error tells you here
you are making changes that are client only data in an SSR component
Answer