-
Notifications
You must be signed in to change notification settings - Fork 525
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 attribute mismatch after update Nuxt to v3.9.0 #1171
Comments
I do have the same issue |
I have the same issue |
Also occurring with <template>
<UCheckbox v-model="state" label="Test checkbox" />
</template>
<script setup lang="ts">
const state = ref(true)
</script> Notably does not occur when the ref is false. Testing against 2.11.1 and 7151b7b with |
getting same things now after the update |
I also got plenty of hydration mismatch after upgrade. |
Same here with ui-pro/landing template |
I think this is due to latest vue In the meantime, can you try to set the resolution to |
3.3.13 fixed it for me for now, thanks! |
Nuxt3.9.1 still has this problem and 3.3.13 can solve it |
Sorry for anoob question, but how did you achieved to pin vue@3.3.13? My package.json looks like below
|
You need to set it in {
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxt/ui": "^2.11.0",
"@nuxtjs/google-fonts": "^3.1.0",
"@pinia/nuxt": "^0.5.1",
"consola": "^3.2.3",
"nuxt-proxy": "^0.4.1",
"pinia": "^2.1.7",
"sass": "^1.69.5",
"vue": "^3.3.9",
"zod": "^3.22.4"
},
"devDependencies": {
"@iconify/vue": "^4.1.1",
"@nuxt/devtools": "^1.0.3",
"@nuxtjs/i18n": "^8.0.0-rc.5",
"@vueuse/core": "^10.6.1",
"@vueuse/nuxt": "^10.6.1",
"nuxt": "^3.9.0",
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7"
},
"resolutions": {
"vue": "3.3.13"
}
} |
@benjamincanac Thank you for quick reply. I've tried what you suggested and while executing npm package.json docs doesnt mention usage of keyword |
Oh sorry, this is for |
i have the same issue with UTable - hydration mistmaches - warning on UCheckbox inside table component |
This seems related as well. See the following reproduction: https://stackblitz.com/edit/nuxt-starter-t3xebe?file=components%2FAttributeTest.vue I have a form with a dynamic action attribute. I even understand the hydration attr mismatch but why is the value wrong on initial load. It should have loaded with "something" and then changed to the clientside date/time. It can change based on the button click. This was unexpected for us. |
I'm facing the same issue |
i do have the same issue -\^-^/- |
Ditto here.. causing all sorts of mismatches with a whole bunch of deps (headless, radix, etc etc). Think the best fix is upstream in vue? I'm using Bun, which supports both the overrides and resolutions syntax. So the temporary solution for me is in package.json:
|
所以是要降低版本来解决这个问题吗 |
问题解决了吗 |
It seems Vue will have its own |
I get the sense you all already understand the root issue, but sense I haven't seen anyone mention it, I'm also seeing this with |
I have the same issue with UDropdown |
Those warnings will appear for the all components using Headless UI underneath. The only fix for now is to pin Those hydration issues were already present but only displayed since Vue 3.4. |
Nuxt has shipped a |
Seeing the same issue...
"resolutions": { |
Same issue with a lot of NuxtUi componentes... even with the "resolutions" option |
Even after overriding, these issues still persist. Not sure if I've done it right though. I am using pnpm- Tested |
I had a bit of trouble overriding the version with npm, causing some dependency issues. After some fiddling, adding an override specifically for nuxt seems to work to set the vue version to 3.3.13 and also eliminates the hydration mismatch errors:
|
"dependencies": { i have so much hydration mismatch errors so just removed nuxt ui kit, any suggestion ? |
@Poraksis There are already tons of comments in this issue answering that already: #1171 (comment) This issue has already been solved and will be released this week in |
I have the same issue |
@m0k99 Do you still encounter this issue with https://github.com/nuxt/ui/releases/tag/v2.14.0? |
|
This issue is about NuxtUI. If you are getting hydration mismatches without NuxtUI, it's a different problem.
If you use a random ID in your component, what is generated on the server will differ from what's generated in the client. Naturally, you will have a hydration mismatch. You can fix this by not using a random ID. |
I'm getting this warning on checkbox, but only when I reload page and checkbox is used on that page. And
didn't help either |
I think checkboxes have been fixed recently and not released yet |
Hmmm, though this was fixed in v2.14.0, but am I mistaken? ├── @headlessui/vue@1.7.20 |
commit c3e23f9 Author: Carlos <carloseam94@gmail.com> Date: Wed May 22 14:30:57 2024 +0200 fix: allow empty annotation guidelines commit b048f5c Author: Carlos <carloseam94@gmail.com> Date: Wed May 22 14:27:03 2024 +0200 fix: labelstudio comp now uses AnnotationLevel enum commit f8ce19b Author: Carlos <carloseam94@gmail.com> Date: Wed May 22 14:18:31 2024 +0200 feat: add guidance step 6. commit f82eea4 Merge: 1d02220 a6e8550 Author: Carlos <carloseam94@gmail.com> Date: Wed May 22 11:32:33 2024 +0200 Merge branch 'granularity' into dev commit a6e8550 Author: Carlos <carloseam94@gmail.com> Date: Wed May 22 11:23:41 2024 +0200 fix: prevent vite from js-optimization on some files that can't be imported as type commit 9caccf7 Author: Carlos <carloseam94@gmail.com> Date: Tue May 21 16:47:50 2024 +0200 feat: add granularity level ui to the task creation modal commit be30e4e Author: Carlos <carloseam94@gmail.com> Date: Tue May 21 14:41:50 2024 +0200 refactor: remove unnecessary dependency commit 5224c5e Author: Carlos <carloseam94@gmail.com> Date: Tue May 21 14:41:31 2024 +0200 feat: support different granularities in labelstudio comp commit 9174a33 Author: Carlos <carloseam94@gmail.com> Date: Tue May 21 14:40:05 2024 +0200 feat: add 3 new annotation level types commit 1d02220 Author: eensander <50321538+eensander@users.noreply.github.com> Date: Tue May 21 13:37:29 2024 +0200 fix: workaround for primevue hydration mismatches as per nuxt/ui#1171 (comment)
Any updates on this? Keep getting hydration issues for Package json:
Message:
|
@lafllamme This issue should have been fixed a long time ago. Please open a new one with a reproduction. |
Environment
Version
v2.11.1
Reproduction
https://stackblitz.com/edit/nuxt-starter-5tmfpt?file=components%2FUserForm.vue
Description
Hi guys,
I updated Nuxt to version 3.9.0 and I am getting
Hydration attribute mismatch
for example onUSelectMenu
orUDropdown
viz screenshot. I think it is a bug and it is now showing afterimprove ssr hydration mismatch checks
in Vue 3.4.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: