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 Syntax Error: Invalid or Unexpected Token #672

Closed
mindfullsilence opened this issue Oct 13, 2017 · 1 comment
Closed

Uncaught Syntax Error: Invalid or Unexpected Token #672

mindfullsilence opened this issue Oct 13, 2017 · 1 comment

Comments

@mindfullsilence
Copy link

mindfullsilence commented Oct 13, 2017

Tell us about your environment
Mac OSX Sierra, Google Chrome 61, CC 2017

JS error:
Uncaught SyntaxError: Invalid or unexpected token
at r.eval (eval at initiateExpression (bodymovin.js:15), :4:11849)
at r.execute [as getValue] (bodymovin.js:13)
at Object.m [as getValue] (bodymovin.js:3)
at SVGBaseElement.BaseElement.prepareFrame (bodymovin.js:7)
at ICompElement.prepareFrame (bodymovin.js:9)
at SVGRenderer.renderFrame (bodymovin.js:5)
at AnimationItem.renderFrame (bodymovin.js:9)
at AnimationItem.gotoFrame (bodymovin.js:9)
at AnimationItem.checkLoaded (bodymovin.js:9)
at AnimationItem.t (bodymovin.js:9)

HTML:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<div id="bm"></div>

<script src="./bodymovin.js"></script>
<script>
  var animation = bodymovin.loadAnimation({
    container: document.getElementById('bm'),
    renderer: 'svg',
    loop: true,
    autoplay: true,
    path: 'data.json'
  })
</script>
</body>
</html>

Export:
https://www.dropbox.com/sh/mzh0u3uowoem3gm/AACjG7LaHVi7uaFyKaZuICJIa?dl=0

Any clue as to what is causing this?

@bodymovin
Copy link
Collaborator

Hi, you're using encoded expressions.
Unfortunately, I have no way to support them.
You can try baking them into keyframes. It will increase the filesize though

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

2 participants