akoenig/gulp-svg2png

Node 6 Compatibility

thejamespower opened this issue · 4 comments

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?

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

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

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

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