aarsteinmedia / dotlottie-player-light

Light Web Component for playing SVG Lottie animations in your web app. Previously @johanaarstein/dotlottie-player-light
GNU General Public License v2.0
4 stars 1 forks source link

I have some problem when i use Vue 3 Nuxt 3 #3

Closed fenn1ks closed 3 weeks ago

fenn1ks commented 2 months ago

Plz help what happened?

Uncaught (in promise) Error: This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.
    at _ChildPart._$setValue (chunk-CJS4KMNJ.js?v=ebd2ff6e:542:13)
    at TemplateInstance._update (chunk-CJS4KMNJ.js?v=ebd2ff6e:473:16)
    at _ChildPart._commitTemplateResult (chunk-CJS4KMNJ.js?v=ebd2ff6e:663:29)
    at _ChildPart._$setValue (chunk-CJS4KMNJ.js?v=ebd2ff6e:562:12)
    at render (chunk-CJS4KMNJ.js?v=ebd2ff6e:992:8)
    at DotLottiePlayer.update (chunk-CJS4KMNJ.js?v=ebd2ff6e:1899:24)
    at DotLottiePlayer.performUpdate (chunk-CJS4KMNJ.js?v=ebd2ff6e:1666:14)
    at DotLottiePlayer.scheduleUpdate (chunk-CJS4KMNJ.js?v=ebd2ff6e:1610:25)
    at DotLottiePlayer.__enqueueUpdate (chunk-CJS4KMNJ.js?v=ebd2ff6e:1586:25)
johanaarstein commented 1 month ago

I'll look into it!

johanaarstein commented 1 month ago

Does this happen in production or in dev mode? And does it crash the page or the animation?

fenn1ks commented 1 month ago

@johanaarstein

Does this happen in production or in dev mode? And does it crash the page or the animation?

This happened in dev mode, i not tested another. So when you page unfocused and you come back to this page when have animation you have some problem. Or if you have on page animation and you scroll down, and after some time you scroll up for back this animation you have this problem.

johanaarstein commented 1 month ago

I see. It's a common warning when using Lit components in dev mode in reactive frameworks and libraries like Vue or React. If you do a local production build for testing the warning should go away. Let me know if the problem persists.

BTW: In a future update I'll be doing away with Lit component and going vanilla, partly because of issues like this.

fenn1ks commented 1 month ago

@johanaarstein in build or generate all ok! But I hope you will update the module soon. Thanks for your work.

johanaarstein commented 3 weeks ago

Version 3 out now, without Lit!