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

Uncaught SyntaxError: The requested module '/node_modules/lottie-web/build/player/lottie.js?v=9fe8ca71' does not provide an export named 'default' #62

Open
ThunderGod95 opened this issue Jun 4, 2022 · 4 comments

Comments

@ThunderGod95
Copy link

Node: v16.13.1
Vue: 3.2.26

Followed the example given on README.md but I get the following error and nothing renders:-

Uncaught SyntaxError: The requested module '/node_modules/lottie-web/build/player/lottie.js?v=9fe8ca71' does not provide an export named 'default'

@HuddleHouse
Copy link

I am also having this error.

@i-ce-fish
Copy link

you are useing vue3, so you should use this https://github.com/megasanjay/vue3-lottie

@289373410
Copy link

289373410 commented Oct 9, 2023 via email

@i-ce-fish
Copy link

i-ce-fish commented Oct 10, 2023

vite 4.0
vue 2.7

I fixed this this problem by other way . you can import lottie-web in main.js before you import vue-lottie

`/**

  • 这行代码看起来没什么用, 但是不能删, 否则会提示报错 does not provide an export named 'default' (at lottie.vue:6:1)
  • 只有当使用vite --force 启动才能复现这个报错
    */
    // eslint-disable-next-line
    import lottieWeb from 'lottie-web'
    // 动画
    import lottie from 'vue-lottie'
    Vue.component('Lottie', lottie)`

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

4 participants