Flare-React icon indicating copy to clipboard operation
Flare-React copied to clipboard

Unexpected token < in JSON at position 0

Open iamthuypham opened this issue 5 years ago • 12 comments

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.

iamthuypham avatar Mar 17 '19 18:03 iamthuypham

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?

iamthuypham avatar Mar 17 '19 19:03 iamthuypham

Ah. Got it to work! 😄

iamthuypham avatar Mar 17 '19 20:03 iamthuypham

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.

iamthuypham avatar Mar 17 '19 20:03 iamthuypham

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 avatar Mar 18 '19 03:03 luigi-rosso

@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 avatar Mar 21 '19 00:03 iamthuypham

@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.

kristinbaumann avatar Apr 13 '19 18:04 kristinbaumann

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?

scalybur avatar May 30 '19 00:05 scalybur

@iamthuypham I'm also getting Unexpected token < in JSON at position 0. What did you do to resolve that issue?

FinalAngel avatar Oct 15 '19 12:10 FinalAngel

@FinalAngel move your exported_animation.flr to the public directory.

groszwilhelm avatar Nov 03 '19 10:11 groszwilhelm

thank you very much, was able to resolve it that way.

FinalAngel avatar Nov 04 '19 09:11 FinalAngel

I am also having this issue

blackflame007 avatar Jul 26 '20 21:07 blackflame007

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'.

calumtomeny avatar Aug 21 '20 22:08 calumtomeny