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

Error: <svg> attribute viewBox: Expected number, "0 0.. #20

Open
wrabit opened this issue Oct 13, 2018 · 27 comments · May be fixed by #40
Open

Error: <svg> attribute viewBox: Expected number, "0 0.. #20

wrabit opened this issue Oct 13, 2018 · 27 comments · May be fixed by #40

Comments

@wrabit
Copy link

wrabit commented Oct 13, 2018

Setting up as per the example and getting:

Error: attribute viewBox: Expected number, "0 0 undefined undefi…

Any ideas?

@Sweetyy
Copy link

Sweetyy commented Oct 18, 2018

Same problem .. i did exactly the same as the example and always have this error...

@patrick-sung
Copy link

should be
animationData: animationData.default

@Sweetyy
Copy link

Sweetyy commented Oct 24, 2018

should be
animationData: animationData.default

Thanks a lot ! It works for me now :)

@sebbean
Copy link

sebbean commented Dec 16, 2018

damn me to! frigg! thanks github!

@Xiaoha0226
Copy link

It works for me too. Thanks! I want to know the reason is 'lottie-web' version upgrade?

@seemcat
Copy link

seemcat commented Jan 10, 2019

@patrick-sung you saved me from something that's been blocking me the entire day. THANK YOU! 😭

@ZalgirisKaunas
Copy link

OMG. WHY THIS ISN'T IN THE DOCUMENTATION.

I literally wasted half of the day..

@lansolo99
Copy link

Yeah, had the same problem, please update the doc, I would never have figured out by myself if @patrick-sung didn't reveal the trick

@TimRChen
Copy link

How can I find this in the Lottie doc?

@alexsandro-xpt
Copy link

Ow please update the documentation( https://github.com/chenqingspring/vue-lottie/blob/master/README.md#L65 ) for animationData.default please!

@dhruvbhatia7
Copy link

Thanks @patrick-sung, was stuck on this for over an hour!

@jeancabral
Copy link

Thx so much

should be
animationData: animationData.default

Very thx! Save my day!

@carlossrb
Copy link

should be
animationData: animationData.default

thanks a lottie!!!

@cmdparkour
Copy link

should be
animationData: animationData.default

thanks for your help,

@Xiaoshizaizi
Copy link

should be
animationData: animationData.default

so cool

@DevidJoshua
Copy link

After

should be
animationData: animationData.default

Finally, thanks ya,,, anyone tell me why it's not working as the documentation...

@pitometsyurii
Copy link

After

should be
animationData: animationData.default

Finally, thanks ya,,, anyone tell me why it's not working as the documentation...

Good question. But seems like it will not be fixed.

@yehee
Copy link

yehee commented Jul 15, 2020

Could also change how it's imported:

- import * as animationData from './planets-spinning.json'
+ import animationData from './planets-spinning.json'

This way you don't have to get animationData.default as it automatically imports the default.

@cazroam
Copy link

cazroam commented Aug 13, 2020

2 years later and the documentation still needs updating :(

There are even PRs for it: #40 #42 #51

@chenqingspring please update? :)

@freddymais
Copy link

Could also change how it's imported:

- import * as animationData from './planets-spinning.json'
+ import animationData from './planets-spinning.json'

This way you don't have to get animationData.default as it automatically imports the default.

Sensacional!!!
Uffaaaa.. ja tava desistindo..
Valeu demais!

@subodhk01
Copy link

@patrick-sung god

@jackdewhurst
Copy link

Update the docs!!!

@anearseeyou
Copy link

should be
animationData: animationData.default

nice

@vitpankin
Copy link

what about Typescript? it's not happy with that saying
Property 'default' does not exist on type '{ v: string; fr: number; ip: number; op: number; w: number; h: number; nm: string; ddd: number; assets: ({ id: string;

@vitpankin
Copy link

Yeah, for TypeScript it's better to do
import { default as animationData } from '../animation-with-blackjack-and-hooks.json'
and then

const defaultOptions:Options = { loop: true, autoplay: true, animationData: animationData, rendererSettings: { preserveAspectRatio: 'xMidYMid slice' } };

@wbdservices
Copy link

should be animationData: animationData.default

where add this?

@raheesm
Copy link

raheesm commented Jul 30, 2023

should be animationData: animationData.default

where should i add this

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

Successfully merging a pull request may close this issue.