svgexport
svgexport copied to clipboard
Error `undefined is not a constructor (evaluating 'el.getBBox()')`
I'm getting this error when converting a nice looking SVG. It's very similar to others I have and can't seem to understand what's the problem here.
svgexport "instagram_076.svg" "instagram_076.png" png 85% 2000:2000
Terminal is giving out:
$ svgexport "instagram_076.svg" "instagram_076.png" png 85% 2000:2000
TypeError: undefined is not a constructor (evaluating 'el.getBBox()')
undefined:24
:33
TypeError: null is not an object (evaluating 'input.width')
It seems whatever was causing this has been fixed. Using the example file with version 0.3.2
of svgexport
svgexport instagram_076.svg instagram_076.png 500:500
file:///C:\Users\foo\instagram_076.svg C:\Users\foo\instagram_076.png png 100% 0.25x 0:0:2000:2000 500:500
I was able to generate the following:
I came here because I had run into the same error text. Mine was possibly more related to #16?
For anyone searching for what might be going on, in my case I did have <?xml version="1.0" encoding="utf-8"?>
as mentioned in the #16, however I had a <link href="https://foo.com/css?family=Bar" rel="stylesheet">
in my svg file which was causing the svgexport
tool to complain. Moving the link
tag outside of the svg file fixed my issue.