Closed fernandofranca closed 1 year ago
The hydration mis-match issue is the same as #34 - and we're awaiting approval for a patch to vue/runtime-core to get that fixed.
Lit version mis-match can also be for slightly different versions of @lit/reative-element
- can you double-check that?
Hi @fernandofranca
It seems that a prelease version was being installed. I have made v1.5.1 available which should remove the Hydration mismatch issue.
Can you try uninstalling and installing the module again?
Regarding the multiple version of Lit, on dev mode, if you inspect litHtmlVersions
in the browser console, you will see
This causes the multiple Lit version issue. But this is stripped off in the production build.
We can look into it why exactly this occurs in dev mode. But I have not done that yet since it is harmless and is not ending up in the prod. build.
Thanks for the fast response @prashantpalikhe 🙇♂️!
I can confirm version 1.5.1
solves the "Hydration node mismatch" warning 🎉.
Regarding the "Multiple versions of Lit" warning it is still there, hopefully is not a big deal.
litHtmlVersions
was showing two different versions ['2.7.2', '2.7.3']
. I set yarn resolution to load only 2.7.3, but it still warns and now shows that same version twice, as in your screenshot.
@steveworkman Regarding @lit/reactive-element
, I have a single version installed: 1.6.1
.
@fernandofranca Yeah, in prod mode, confirm that you only have one version being loaded. Should be good.
If you confirm that, I can go ahead and close this issue :)
I set up a small sample project using Nuxt@3.0.0 nuxt-ssr-lit@1.5.1-beta.2.
In the project I added a simple Lit component and a Nuxt page using that component.
When I start the Nuxt in development mode I get two warnings:
I'm not sure why it is reporting multiple versions of Lit, as when I run
yarn why lit
I only see one version of Lit being used.If I remove the Lit elements from the template, the "Hydration node mismatch warning" goes away. When I remove the import for the custom component, the "Multiple versions of Lit" warning also goes away.
To Reproduce Steps to reproduce the behavior:
yarn
yarn dev
Expected behavior No warning messages.
Additional context Add any other context about the problem here.