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

Got an Uncaught SyntaxError #109

Open
3 tasks done
sososdk opened this issue Mar 5, 2020 · 2 comments
Open
3 tasks done

Got an Uncaught SyntaxError #109

sososdk opened this issue Mar 5, 2020 · 2 comments

Comments

@sososdk
Copy link

sososdk commented Mar 5, 2020

Issue

Uncaught SyntaxError: Expected a flag, got "10" at index "33"
    at SVGPathDataParser._transform (script.js:51738)
    at SVGPathDataParser.Transform._read (script.js:50740)
    at SVGPathDataParser.Transform._write (script.js:50728)
    at doWrite (script.js:51006)
    at writeOrBuffer (script.js:50996)
    at SVGPathDataParser.Writable.write (script.js:50963)
    at Function.SVGPathData.parse (script.js:51288)
    at new SVGPathData (script.js:51178)
    at applyTransforms (script.js:52379)
    at SAXStream.<anonymous> (script.js:52648)

I'm a gentledev i:

  • fully read the README recently
  • searched for existing issues
  • checked i'm up to date with the latest version of the project

Steps to reproduce the behavior

Convert below svg file in the page

<svg width="22" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M4.6 20L21.1 3.5a1.556 1.556 0 10-2.2-2.199l-17.599 17.6a1.556 1.556 0 000 2.199l17.6 17.599a1.556 1.556 0 002.199-2.2L4.6 20z" fill="#333" fill-rule="nonzero"/></svg>
@nfroidure
Copy link
Owner

Probably an issue with SVGPathData, try to run the last version or report an issue like that one : nfroidure/svg-pathdata#36

@TheSonOfThomp
Copy link

TheSonOfThomp commented Aug 17, 2020

I had the same issue.
It looks like it was an issue caused by svgo compression, at least in my case.
My current workaround is to re-export my original svgs from Sketch (for example) and run the command again

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

3 participants