Skip to content
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

README for Nuxt 3 seems to be incorrect for Nuxt v3.12 #252

Open
blumewas opened this issue Aug 26, 2024 · 0 comments
Open

README for Nuxt 3 seems to be incorrect for Nuxt v3.12 #252

blumewas opened this issue Aug 26, 2024 · 0 comments

Comments

@blumewas
Copy link

Hello,

I have tried to add Lottie to our nuxt 3 app today. First I have copied the instructions from the README. But when I run npm run dev I have received the following error.

[nuxt] error caught during app initialization TypeError: plugin.apply is not a function

To fix the issue I modified the code in the following way:

import * as LottiePlayer from "@lottiefiles/lottie-player";

// export default LottiePlayer <-- this doesnt seem to work
export default defineNuxtPlugin(() => LottiePlayer); // <-- this works

Now everything works as expected for me.
Wanted to share this since maybe some other folks may stumble upon this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant