Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Uncaught node.js Error #14

Open
kenetik opened this issue Jul 11, 2013 · 8 comments
Open

Uncaught node.js Error #14

kenetik opened this issue Jul 11, 2013 · 8 comments
Labels

Comments

@kenetik
Copy link

kenetik commented Jul 11, 2013

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

@deepsweet
Copy link
Member

nice :)

i'll take a look, thanks.

@Ne-Ne
Copy link

Ne-Ne commented May 7, 2014

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

@Vasilich
Copy link

Vasilich commented Jun 5, 2014

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?

@yashilanka
Copy link

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

@gchtr
Copy link

gchtr commented Jun 19, 2014

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...

@IanOliver
Copy link

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.

@Nettsentrisk
Copy link

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

@kevbost
Copy link

kevbost commented Feb 27, 2015

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants