akoenig / gulp-svg2png

A gulp plugin for converting SVGs to PNGs.
MIT License
54 stars 34 forks source link

Node 6 Compatibility #30

Closed thejamespower closed 8 years ago

thejamespower commented 8 years ago

I know there's a lot of issues around this topic currently, but I've tried seemingly every combination of Node 6+ and Gulp-svg2png and cannot get any to build. A new issue I've seen when running Node 6.7.0 is:

Message:
    Error while converting the image: Width or height could not be determined from either the source file or the supp
lied dimensions

  phantomjs://code/converter.js:46 in onLoadFinished
(node:38220) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error in plugin 'gulp-
svg2png'

Any ideas?

sammdec commented 8 years ago

Im also getting this annoyingly thought it is only happening on our CI and not locally, running node 6.6.0 and npm 3.10.3

ValentinCreative commented 8 years ago

Same issue for me, after updating node to 6.7.0 and resolving this #28

thejamespower commented 8 years ago

Discovered it's actually a change in how the underlying svg2png library works. Unfortunately the creators of that library have decided to remove the functionality that 'guesses' the size of the required from the viewBox. For us, adding absolute dimensions to 100+ svg dependencies is not an option, for responsiveness and other sanity reasons. We are in the process of creating another gulp plugin that re-adds this functionality back in and will hopefully share it with the community.

retan commented 6 years ago

@thejamespower Did you manage to come up with something that works?