-
Notifications
You must be signed in to change notification settings - Fork 12
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
Package broken for typescript? #11
Comments
I renamed the types file and I haven't updated the config - thanks for finding this. I'll update this asap. |
I've just pushed v2.0.6 - can you check this works for you? Make sure you register main.ts import { createApp } from "vue";
import App from "./App.vue";
import LottieAnimation from "lottie-web-vue";
const app = createApp(App);
app.use(LottieAnimation);
app.mount("#app"); I've not got the package working through per-component imports. Not sure why this isn't working, investigating this now. |
The module is recognized now, but it still throws a dramatic compilation error on the app.use() part:
|
I would say in your type
The error go away, if I change it like this, but then I'm back to: Fingers crossed! |
Hey @Andreas-Schoenefeldt thanks for your help so far. I'm having trouble getting that issue to show with my current project settings. Is there any way you could share your code or make an example repo? I've created a brand new Vue 3 + typescript app using:
With Typescript + Eslint + Prettier I have no issues when adding the plugin to Would you be able to clone the test repo to test or provide a project for me to take a look at? I'm using Vite + rollup-plugin-typescript2 to automatically produce typings for my components so either I'm running into a config issue or theres a bug with the Rollup library. |
Follow up question - what version of Vue are you using? |
Hi @garbit, I have to thank for you swift replies! We are running on Many thx again! |
Hi @garbit, so if I upgrade to I'll try to work this out individually with the other packages, I can not test it jet but it looks like this is actually the fix. Thx again! |
How interesting... It looks like it is connected to yarn and yarn workspaces which we are using... I keep you posted. |
brr, I changed vue now in all yarn workspaces to
I'll try stack overflow for that one. |
Lot's to think about there! Thank you for taking a look. I've had issues previously with forgetting to disable Vetur plugin whilst in a Vite project in VSCode. Is it possible to have a skeleton project that I can run to test against? |
Let me create a simple one for reproduction 👍 |
@Andreas-Schoenefeldt I think the latest pull request from @reslear might provide you with the typing you'll need: Lines 71 to 81 in af26c11
Can you take a look and see if this resolves your issue? |
Hi @garbit, unfortunately not - the fix appears to be only pointing to solving some VSCode issues - in my context Thx for your support! |
Hi @garbit, I amanged now :) It's a simple and pretty much stripped down repo, which has the basic features of our setup and also 1:1 the error I'm experiencing: https://github.com/Andreas-Schoenefeldt/lottie-web-vue-yarn-ts/ I invited you as editor as well, please feel free to change whatever you want to. Thx again, I tried to fiddle with the d.ts file also a bit meanwhile, but are kind of over my head here - meaning I was not able to make it work. Thx again |
Thanks @Andreas-Schoenefeldt - I'll clone and take a look to see if I can resolve this issue. |
Hi @garbit, we switched now to play mp4, but in case you still find a possibility in the next days, I could still switch back. Otherwise it's probably ok to close this one till the next one runs into a weirdness like this ;) |
@garbit @Andreas-Schoenefeldt did you ever find a solution for this? Have a client project who are using similar old vue version and run into that same issue...? |
Hi @oneWaveAdrian, unfortunatley not - we had to revert the animations to mp4 video files to get it running. |
we can use another our package https://github.com/megasanjay/vue3-lottie |
@reslear I found that yesterday as well and it works - thanks though! @Andreas-Schoenefeldt bummer, I encourage you to try that other package - keeps traffic & thus data cost down ;) |
@oneWaveAdrian i'm add for beta support |
This has been resolved with the new v2.0.7 release: https://github.com/garbit/lottie-web-vue/releases/tag/v2.0.7 |
Hello,
in addition to #10, now with version 2.0.4 (thx for the support!) unfortunately some of the actual files appear to be missing:
What I got after a fresh install of v2.0.4:
in the
package.json
this missing files is declared as types:It might be already enough to add it, but there might be more to it - my IDE in general thinks at the moment the package is not there:
Maybe this SO Issue is a good lead: https://stackoverflow.com/questions/67918575/ts2307-cannot-find-module-or-its-corresponding-type-declarations
Thx for looking into this!
Andreas
The text was updated successfully, but these errors were encountered: