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

Unexpected token < in JSON at position 0 #1

Open
iamthuypham opened this issue Mar 17, 2019 · 12 comments
Open

Unexpected token < in JSON at position 0 #1

iamthuypham opened this issue Mar 17, 2019 · 12 comments

Comments

@iamthuypham
Copy link

iamthuypham commented Mar 17, 2019

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
Copy link
Author

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
Copy link
Author

Ah. Got it to work! 😄

@iamthuypham
Copy link
Author

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.

@luigi-rosso
Copy link
Contributor

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

@iamthuypham
Copy link
Author

iamthuypham commented Mar 21, 2019

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

@kristinbaumann
Copy link

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

@scalybur
Copy link

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?

@FinalAngel
Copy link

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

@groszwilhelm
Copy link

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

@FinalAngel
Copy link

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

@blackflame007
Copy link

I am also having this issue

@calumtomeny
Copy link

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

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

8 participants