Flare-React
Flare-React copied to clipboard
Unexpected token < in JSON at position 0
I installed create-react-app
and added a simple flare file.
I am able to see the Flare logo, but cannot see my animation.
Not sure what is wrong.
Actually, I have to add my .flr
inside public. I can see the canvas
, but the animation seems not run.
Should I use Binary or Json flr file?
Ah. Got it to work! 😄
Question: about the Flare logo on loading, is it required to display the logo if it is used in an open-source project?
I would love to mention Flare inside my project readme, but not display Flare logo when loading animation though.
Glad you figured it out!
It's not a requirement to show the logo, we had it there mostly to help show the component's location when it doesn't have an animation. We can definitely make it optional (add an option to never show it).
@luigi-rosso I could help adding the props for optional logo if you want to.
I tried to run Flare-React locally, but dont know how to link the Flare-JS dependency. Can you update the doc with step-by-step to set it up?
@iamthuypham Hi! I am on the same path trying to get a simple Flare file showing up in create-react-app. How did you get the animation running? I only see the Flare icon and then the finished animation appears right away.
Related with this issue, i have the same output on console, my animation is not displayed, instead is showing the flare pink logo... anyone know how to fix it?
@iamthuypham I'm also getting Unexpected token < in JSON at position 0
. What did you do to resolve that issue?
@FinalAngel move your exported_animation.flr to the public directory.
thank you very much, was able to resolve it that way.
I am also having this issue
The .flr
file needs to be in the public folder and the file
attribute is relative to the public folder. If your file is /public/animate.flr
then your attribute should be file='animate.flr'
.