akoenig / gulp-svg2png

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

Issue with new MacOs Sierra #28

Open ajshortt opened 8 years ago

ajshortt commented 8 years ago

NPM: 3.10.3 Node: 6.5.0 gulp-svg2png: ^0.3.0

Getting the following error since upgrading to the latest OS

/Users/auser/Sites/site/wp-content/themes/atheme/node_modules/gulp-svg2png/index.js:59
        throw new gutil.PluginError(PLUGIN_NAME, message);
        ^
Error: Error while converting image.Error: Command failed: /Users/auser/Sites/site/wp-content/themes/atheme/node_modules/svg2png/node_modules/phantomjs/lib/phantom/bin/phantomjs /Users/auser/Sites/site/wp-content/themes/atheme/node_modules/svg2png/lib/converter.js /Users/auser/Sites/site/wp-content/themes/atheme/resource/img/sprites.svg /var/folders/0w/xkb5znzs53l36ym1v6w_3mkr0000gn/T/4f742ae2-edb7-4647-8531-85e323ee758d-sprites.png 1

    at error (/Users/auser/Sites/site/wp-content/themes/atheme/node_modules/gulp-svg2png/index.js:59:15)
    at converted (/Users/auser/Sites/site/wp-content/themes/atheme/node_modules/gulp-svg2png/index.js:160:24)
    at /Users/auser/Sites/site/wp-content/themes/atheme/node_modules/svg2png/lib/svg2png.js:18:13
    at ChildProcess.exithandler (child_process.js:213:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
benwilkins commented 8 years ago

Same. Getting the same error after upgrading to Sierra.

ValentinCreative commented 8 years ago

Same error Node : 0.12.15 NPM : 2.15.1 svg2png : ^0.3.0

ajshortt commented 8 years ago

Well I tried updating to the latest version of gulp-svg2png and resolved the issue but my deployment setup/server doesnt like the use of ES6 const which the latest version has

aaronbushnell commented 8 years ago

I'm having the same issue with the ES6 syntax, @ajshortt. I believe it's because of this issue domenic/svg2png#58 where svg2png version 3.1.1 and up requires Node 6.x.

I think forcing svg2png to be at version 3.1.0 would correct this, but I'm unsure if the creator of this plugin would be open to forcing that specific version.

aaronbushnell commented 8 years ago

D'oh! Sorry, I missed the fact that you are on Node 6.x, @ajshortt. The newest version of gulp-svg2png (2.0.2) works for me with Node 6.x.

matthewmcclatchie commented 8 years ago

Was having exactly the same issues.

Node v6.x and svg2png v2.0.2 is working for me.

@aaronbushnell Thanks for pointing out the latest Node requirements, I totally missed that!

aaronbushnell commented 8 years ago

You bet, @matthewmcclatchie!

cjpillette commented 8 years ago

Same error as well Node : 4.6.1 NPM : 2.15. svg2png : 0.3.0

anartfulscience commented 8 years ago

Same error too. Upgraded to macOS Sierra with the latest version of svg2png v2.0.2 and it stopped working.

.../node_modules/svg2png/lib/svg2png.js:2 const path = require("path"); ^^^^^

jenswaern commented 8 years ago

I'm having same issue - not sure how to go about solving this?

SarikaVanapalli commented 7 years ago

+1

mooddesign commented 6 years ago

I'm also seeing the same issue with v1.0.2 of gulp-svg2png. Using it on MacOS Sierra 10.12.6 (16G1036) with

node v4.8.0 npm v2.15.11 nvm v0.33.0


I can confirm that the newer version 2.x works fine, but sadly I cannot update the node version on some of our build environments.


/Users/{user}/workspace/vagrant-all/projects/{project}/node_modules/gulp-svg2png/index.js:49 throw new gutil.PluginError(PLUGIN_NAME, message); ^ Error: Error while converting image. Error: Command failed: /Users/{user}/workspace/vagrant-all/projects/{project}/node_modules/gulp-svg2png/node_modules/svg2png/node_modules/phantomjs/lib/phantom/bin/phantomjs /Users/{user}/workspace/vagrant-all/projects/{project}/node_modules/gulp-svg2png/node_modules/svg2png/lib/converter.js /Users/{user}/workspace/vagrant-all/projects/{project}/web/images/svg/sprite.svg /var/folders/zh/hrbwf4n12jz_djrqqkvhdfjw0000gn/T/59382cbe-151b-403f-90a3-b53e4744481b-sprite.png 1