-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hydration mismatch issue #4544
Comments
Can you share a sample repo where this is happening? One possible reason might be you’ve clean urls enabled and in serve you need to pass some flag to make it work. |
At vueuse we are facing hydration mismatch. I tracked the error down to the @medemi68 you can enable |
That doesn't cause actual hydration errors. attribute-only mismatches only show the warnings when that flag is set. 👀 Is there an open issue at vueuse's repo? But yeah I think we can merge 4493. Let me check once with non-overlay sidebars.
One can also run |
we dont have an issue for this (not sure why tho) and its not causing any "real issues". Its still present at vueuse docs: https://vueuse.org/shared/createGlobalState/ |
Very weird. It's not happening on mac. I'll check on Windows 👀 |
I manually compared the server html with the hydrated html: maybe its a vueuse localization issue 🤔: Local served build (DEBUG=true) only shows the error from #4493 |
Ah yeah, got it. Overrode the locale from sensors tab. It shows the error now. It's the changelog stuff. |
sorry, can you explain this? How do you get the error? EDIT: ohhh. you mean the dates? 😅 |
This can be different in client than in server. You should do that inside onMounted.
Date time formatting stuff is tricky, and since it's inside v-for in your case, it will be more tricky. But maybe you can create a separate DateTime component that handles the SSR and formatting stuff, and use it instead. It should work fine I guess. Or maybe just add
Daniel created a whole module for this in Nuxt - https://github.com/danielroe/nuxt-time 😅 |
Describe the bug
Hello Everyone,
I just found a weird issue that happens for me (and I think others) when building and serving Vitepress. I am on version 1.6.3.
When using
serve -s .vitepress/dist -l 8080
after building, the page fails to render correctly and I also get the following issue in the console. This only seems to happen when navigating directly to pages by URL.Hydration completed but contains mismatches.
HOWEVER, I seem to have found a workaround when using http-server instead? It seems to work fine with:
npx http-server .vitepress/dist -p 8080 --push-state
Do we think this might be an issue related to vitepress or with serve?
Reproduction
Use vitepress 1.6.3, and npm install -g serve, then run
serve -s .vitepress/dist -l 8080
Expected behavior
The site should be statically served without issues.
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: