svgo-gui icon indicating copy to clipboard operation
svgo-gui copied to clipboard

Uncaught node.js Error

Open kenetik opened this issue 10 years ago • 8 comments

screen shot 2013-07-11 at 6 15 36 pm

kenetik avatar Jul 11 '13 23:07 kenetik

nice :)

i'll take a look, thanks.

deepsweet avatar Jul 12 '13 07:07 deepsweet

@deepsweet just checked, still getting the error above. Intermittent on some svgs..

Ne-Ne avatar May 07 '14 11:05 Ne-Ne

i have exact the same error but on windows . Uncaught node.js Error

TypeError: Argument must be a string at eval (file:///C:/Temp/nw74320_26661/script.js:103:55) at Object.eval as oncomplete .

with all of SVGs i tested (~10).should i post some of them?

Vasilich avatar Jun 05 '14 07:06 Vasilich

i Have also same error, every time i drag a svg file in to this window it shows me above error...

yashilanka avatar Jun 19 '14 11:06 yashilanka

I had the same error both with svgo-gui and gulp-svgo and tried exporting it from Adobe Illustrator in a different format.

With a little trial and error I found out that the error occurs when the option Preserve Illustrator Editing Capabilites is checked:

preserve-capabilities png

If you look at the files, you can see the difference and where it might get stuck.

Example: Simple black rectangle svg: small-black-rectangle

preserve capabilites unchecked


<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
<rect x="8" y="13" width="83" height="41"/>
</svg>

preserve capabilites checked


<?xml version="1.0" encoding="utf-8"?>
    <!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
        <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
        <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
        <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
        <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
        <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
        <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
        <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
        <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
    ]>
    <svg version="1.1" id="Ebene_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
         xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100"
         enable-background="new 0 0 100 100" xml:space="preserve">
    <switch>
        <foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
            <i:pgfRef  xlink:href="#adobe_illustrator_pgf">
            </i:pgfRef>
        </foreignObject>
        <g i:extraneous="self">
            <rect x="8" y="13" width="83" height="41"/>
        </g>
    </switch>
    <i:pgf  id="adobe_illustrator_pgf">
        <![CDATA[
        eJzsveuSJLeVJvgE/g6xP9pMHBtGA46ra8faLCIjU60eXWii1N27PWO0UjFFVasutKqitOqX2YfZ
    F9vvOwfwC+BRmSSrxJppJozFTAccgONycK4f/u7/+OzzT09fvvr9/afuaA7D3/3dzev7J29fvf7p
    QZ4efv78+Tdv3r7mo5/85pODTUeDQqef5y9KwX++f/3m2auXP2WWlcw7vv2TX3zzpydvDj/7H9GO...

gchtr avatar Jun 19 '14 20:06 gchtr

Thanks @lgaechter, I had the same problem and can confirm that unchecking the 'Preserve Illustrator Editing Capabilities' option before saving the SVG prevents this error from happening in SVG GUI.

IanOliver avatar Jul 09 '14 14:07 IanOliver

I'm getting the error even when not checking off that option in Illustrator.

Nettsentrisk avatar Oct 27 '14 14:10 Nettsentrisk

In the Illustrator export, make sure "CSS Properties: " is NOT set to "Style Attributes (Entity References)".

I switched to just "Style Attributes" and did not receive the error again.

kevbost avatar Feb 27 '15 21:02 kevbost