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

Inkscape-generated SVG error from image-size library #47

Closed
jdormit opened this issue Feb 8, 2017 · 1 comment
Closed

Inkscape-generated SVG error from image-size library #47

jdormit opened this issue Feb 8, 2017 · 1 comment

Comments

@jdormit
Copy link
Member

jdormit commented Feb 8, 2017

Running jus serve or jus build on a static site that includes this Inkscape-generated .svg file results in the following error:

TypeError: invalid svg
  at Object.calculate (/home/jeremy/spark/sparkeditor.github.io/node_modules/image-size/lib/types/svg.js:72:9)
  at lookup (/home/jeremy/spark/sparkeditor.github.io/node_modules/image-size/lib/index.js:26:31)
  at module.exports (/home/jeremy/spark/sparkeditor.github.io/node_modules/image-size/lib/index.js:100:12)
  at Image.setDimensions (/home/jeremy/spark/sparkeditor.github.io/node_modules/jus/lib/files/image.js:22:23)
  at Image.squeeze (/home/jeremy/spark/sparkeditor.github.io/node_modules/jus/lib/files/image.js:16:10)
  at Image.File (/home/jeremy/spark/sparkeditor.github.io/node_modules/jus/lib/file.js:13:10)
  at Image (/home/jeremy/spark/sparkeditor.github.io/node_modules/jus/lib/files/image.js:11:5)
  at createFile (/home/jeremy/spark/sparkeditor.github.io/node_modules/jus/lib/jus.js:30:12)
  at FSWatcher.chokidar.watch.on (/home/jeremy/spark/sparkeditor.github.io/node_modules/jus/lib/jus.js:54:30)
  at emitTwo (events.js:106:13)
  at FSWatcher.emit (events.js:191:7)
  at FSWatcher.<anonymous> (/home/jeremy/spark/sparkeditor.github.io/node_modules/chokidar/index.js:191:15)
  at FSWatcher._emit (/home/jeremy/spark/sparkeditor.github.io/node_modules/chokidar/index.js:233:5)
  at FSWatcher.NodeFsHandler._handleFile (/home/jeremy/spark/sparkeditor.github.io/node_modules/chokidar/lib/nodefs-handler.js:275:10)
  at FSWatcher.<anonymous> (/home/jeremy/spark/sparkeditor.github.io/node_modules/chokidar/lib/nodefs-handler.js:473:21)
  at FSReqWrap.oncomplete (fs.js:123:15)

At first I thought it was this image-size bug, but I upgraded the image-size library to the latest version in which the bug was fixed in my fork and the problem persisted. I'm filing an issue with the image-size repo as well, but I thought I'd put it here in case there's a downstream solution.

@jdormit
Copy link
Member Author

jdormit commented Feb 8, 2017

Well, that's embarrassing. What was actually going on is that I have an svg font, which image-size was trying to parse as an image. That's a different issue, so I'm closing this and opening a different issue.

@jdormit jdormit closed this as completed Feb 8, 2017
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

1 participant