dbushell / grunt-svg2png

Grunt plugin to rasterize SVG to PNG images using PhantomJS
MIT License
76 stars 37 forks source link

svg2png 0.2.0 doesn't work for me (hangs) #1

Closed flokli closed 11 years ago

flokli commented 11 years ago

I tried version 0.2.0, using config:

            svg2png: {
                all: {
                    files: [{
                            src: ['main/icons-src/common/*.svg'],
                            dest: 'main/icons/common/'
                        }
                    ]
                }
            },

Output:

Running "svg2png:all" (svg2png) task

Rasterizing SVG to PNG (25 files)...
0% [ =                         ] 4.00% (0.2s) ^C
Shutting down the watch task...OK

... it keept staying at the 4.00%, until I killed it manually.

With Version 0.1.2 and the same config, it works without any problems after a second.

Is this a known problem? Should I provide any more information for you to debug?

dbushell commented 11 years ago

Hmm, well if you could provide the exact files that would be really helpful but I can understand if that isn't possible. Try doing a fresh npm install or npm update to make sure nothing is conflicting. What system are you running?

I'll need to do a lot more testing myself.

flokli commented 11 years ago

npm update or npm install after deleted node_modules folder didn't work. I'm currently on nodejs-0.10.8, will update to 0.10.9 soon and let you know if that helps.

flokli commented 11 years ago

I'm currently on node 0.10.13. The problem persists. Something interesting I observed:

If I'm inside the main project directory or inside a code subdirectory, the svg2png task hangs. But when I'm inside node_modules/grunt-svg2png, (so wd set inside your module directory) the conversion process runs!

Inside node_modules/grunt-svg2png/node_modules I only see the phantomjs directory. Inside my "root" node_modules, I don't have phantomjs directory (so probably no conflict here).

Do you have any idea what could cause this behaviour?

flokli commented 11 years ago

Nice! commit 108a27649fbbe8a9c16657b67c4f26995ca2b40e fixed it for me.

Could you do a new release so that I can add this version as a dependency?

esr360 commented 8 years ago

Does anyone know what was causing this issue? It sounds like an exact problem I'm having.

EDIT: I guess my config was just a bit wrong. It's working now, and this is my setup:

all: {
    files: [{ 
      flatten: true,
      cwd: 'assets/_images/svg/',
      src: '*.svg', 
      dest:'public/images/png' 
    }]
}