akoenig / gulp-svg2png

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

Missing Plugin name #15

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi,

I am getting the following errors when running my gulp task:

node_modules/gulp-util/lib/PluginError.js:72 if (!this.plugin) throw new Error('Missing plugin name'); ^

Error: Missing plugin name at new PluginError (/usr/home/apache/hosts/WSBprojects/SX-Ecommerce/node_modules/gulp-util/lib/PluginError.js:72:27) at Command.error (/usr/home/apache/hosts/WSBprojects/SX-Ecommerce/node_modules/gulp-svg2png/index.js:49:15) at converted (/usr/home/apache/hosts/WSBprojects/SX-Ecommerce/node_modules/gulp-svg2png/index.js:84:30) at /usr/home/apache/hosts/WSBprojects/SX-Ecommerce/node_modules/svg2png/lib/svg2png.js:18:13 at ChildProcess.exithandler (child_process.js:210:5) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at maybeClose (internal/child_process.js:818:16) at Socket. (internal/child_process.js:319:11) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at Pipe._onclose (net.js:469:12)

Any help on this issue would be appreciated,

Thanks,

idleberg commented 8 years ago

Same here on node v4.2.3

berstend commented 8 years ago

Same here, but only on the CI server, not my (OSX) workstation:

[19:46:15] Error: Missing plugin name
  at new PluginError (/pipeline/build/node_modules/gulp-util/lib/PluginError.js:72:27)
  at Command.error (/pipeline/build/node_modules/gulp-svg2png/index.js:49:15)
  at converted (/pipeline/build/node_modules/gulp-svg2png/index.js:84:30)
  at /pipeline/build/node_modules/svg2png/lib/svg2png.js:18:13
  at ChildProcess.exithandler (child_process.js:221:5)
  at emitTwo (events.js:88:13)
  at ChildProcess.emit (events.js:173:7)
  at maybeClose (internal/child_process.js:819:16)
  at Socket.<anonymous> (internal/child_process.js:320:11)
  at emitOne (events.js:78:13)
  at Socket.emit (events.js:170:7)
  at Pipe._onclose (net.js:470:12)

npm install:

> phantomjs@1.9.19 install /pipeline/build/node_modules/phantomjs
> node install.js

PhantomJS not found on PATH
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...
oving /pipeline/build/node_modules/phantomjs/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1451677531193/phantomjs-1.9.8-linux-x86_64 -> /pipeline/build/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /pipeline/build/node_modules/phantomjs/lib/phantom/bin/phantomjs
$ echo "node version $(node -v) running"
node version v5.2.0 running
$ echo "npm version $(npm -v) running"
npm version 3.3.12 running
berstend commented 8 years ago

Installing these ubuntu packages fixed the issue for me: libfontconfig and libfreetype6

old9 commented 8 years ago

Same here on Windows 7 64bit with node v0.12.5. The same setup has no issue with version 0.3.0

artem-malko commented 8 years ago

:+1:

srissel commented 8 years ago

Same here too. Any fix is welcome...

its-me-mario commented 8 years ago

I'm having the same issue.

mbitson commented 8 years ago

I am also having this issue with particular SVG files. Others work fine. I'm attempting to figure out what tag in the SVG markup is causing the problem currently.

mbitson commented 8 years ago

I'm not sure what ended up being the problem. Potentially because I ran the SVG through a minification process. Either way, I just opened the SVG in illustrator and saved it again and it works fine.

spacedawwwg commented 8 years ago

I'm having the same issue. (OS X El Capitan 10.11.3)

Hiswe commented 8 years ago

Plugin name should be provided :) I have been able to locate the wrong file in my case. That was this:

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="0 0 0 0">
<defs><filter id="dropshadow" height="64px">
    <feGaussianBlur in="SourceAlpha" stdDeviation="0"/> <!-- stdDeviation is how much to blur -->
    <!-- recolor shadow -->
    <feColorMatrix in="SourceGraphic"
          type="matrix"
          values="0 0 0 0 0
                  0 0 0 0 0
                  0 0 0 0 0
                  0 0 0 .75 0" />
    <feOffset dx="2" dy="2" result="offsetblur"/> <!-- how much to offset -->
    <feMerge>
      <feMergeNode/> <!-- this contains the offset blurred image -->
      <feMergeNode in="SourceGraphic"/> <!-- this contains the element that the filter is applied to -->
    </feMerge>
  </filter></defs>
</svg>
commwork commented 8 years ago

Same problem here (Windows 10, NPM 3.8.0). I have to add:

<?xml version="1.0"?>

on top to get it working. So I have to change:

<svg version="1.0" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
    <path d="M12,0L1,6v12.1L12,24l11-5.9V6.1L12,0z M19.9,6.6L12,10.9L4.1,6.6L12,2.3L19.9,6.6z M13,21.2v-8.6l8-4.3v8.6L13,21.2z"/>
</svg>

to:

<?xml version="1.0"?>
<svg version="1.0" id="Ebene_1" xmlns="http:/ ... ... ... 13,21.2z"/>
</svg>

.

akoenig commented 8 years ago

Should be fixed in 1.0.2 and 2.0.0. Thanks to @saadouus :)

Can anybody check the new release and give me a hint if everything is working as expected? Thanks :)