mapbox / spritezero

small opinionated sprites
Other
173 stars 62 forks source link

Error: SVG parse error: Unable to parse '��ࡱ� #64

Closed eduboxgithub closed 4 years ago

eduboxgithub commented 5 years ago

I'm trying to export an atlas using a bouch of SVG.

When I run the command spritezero sprite export_svg I get the following error:

$ spritezero sprite export_svg
C:\Users\myuser\AppData\Roaming\npm\node_modules\@mapbox\spritezero-cli\bin\spritezero:85
        if (err) throw err;
                 ^

Error: SVG parse error:
Unable to parse '��ࡱ�
eduboxgithub commented 5 years ago

My SVG folder had a hidden file "THUMBS.DB".

I had to debug the script and found the hidden file looking at the logs.

I added an extra validation:

filepaths(input).forEach(function (file)
{
    **if (file.indexOf(".svg") !== -1)**
        q.defer(loadFile, file);
});
springmeyer commented 4 years ago

Glad you could workaround this problem. In the future if you have issues related to the CLI tool, please file an issue at https://github.com/mapbox/spritezero-cli/issues instead (since it looks like that is the tool you are using here).