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

Error when generating font due to glyp #536

Closed
abanghendri opened this issue Feb 27, 2024 · 2 comments
Closed

Error when generating font due to glyp #536

abanghendri opened this issue Feb 27, 2024 · 2 comments

Comments

@abanghendri
Copy link

Node version: v14.21.3
npm version: 6.14.18

I generate icon using fantasticon SVGs -o webfont -n my-icons -g css html -p icon, but always get this error:

events.js:377
      throw er; // Unhandled 'error' event
      ^

Error: Got an error parsing the glyph "all": path must start with moveto.
    at SAXStream.<anonymous> (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/svgicons2svgfont/src/index.js:325:11)
    at SAXStream.emit (events.js:400:28)
    at SAXParser.me._parser.<computed> [as onopentag] (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/sax/lib/sax.js:259:17)
    at emit (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/sax/lib/sax.js:625:35)
    at emitNode (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/sax/lib/sax.js:630:5)
    at openTag (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/sax/lib/sax.js:826:5)
    at SAXParser.write (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/sax/lib/sax.js:1293:13)
    at SAXStream.write (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/sax/lib/sax.js:240:18)
    at ReadStream.ondata (internal/streams/readable.js:731:22)
    at ReadStream.emit (events.js:400:28)
Emitted 'error' event on SVGIcons2SVGFontStream instance at:
    at SAXStream.<anonymous> (/home/hendri/.nvm/versions/node/v14.21.3/lib/node_modules/fantasticon/node_modules/svgicons2svgfont/src/index.js:323:14)
    at SAXStream.emit (events.js:400:28)
    [... lines matching original stack trace ...]
    at ReadStream.emit (events.js:400:28)
@oxguy3
Copy link

oxguy3 commented Apr 14, 2024

Looks like your all.svg icon might have invalid SVG syntax.

@abanghendri
Copy link
Author

resolved, I use nvm and I forgot to switch my node version :)

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