svg-sprite / grunt-svg-sprite

SVG sprites & stacks galore — Grunt plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours

Home Page:https://github.com/svg-sprite/svg-sprite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error message on npm install

stephane-r opened this issue · comments

Hi,

I would like install this plugin, but i've error message on npm install grunt-svg-sprite --save-dev.

From log :

8640 error Windows_NT 6.1.7601
8641 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt-svg-sprite" "--save-dev"
8642 error node v0.12.0
8643 error npm  v2.5.1
8644 error code ELIFECYCLE
8645 error phantomjs@1.9.15 install: `node install.js`
8645 error Exit status 1
8646 error Failed at the phantomjs@1.9.15 install script 'node install.js'.
8646 error This is most likely a problem with the phantomjs package,
8646 error not with npm itself.
8646 error Tell the author that this fails on your system:
8646 error     node install.js
8646 error You can get their info via:
8646 error     npm owner ls phantomjs
8646 error There is likely additional logging output above.

Do you have any idea ?

Thank you :)

@Leg3ndz Did you install PhantomJS before? If not, please make sure to do so — and be aware that grunt-svg-sprite is not yet compatible with the brand new PhantomJS 2.0. You might get the right version at https://code.google.com/p/phantomjs/downloads/list

Hi @jkphl,

Yep, PhantomJS is on my Windows, and he's present on the PATH. v1.9.8.

Can you please try to do a global PhantomJS Node install, like npm install phantomjs -g (untested)?

Install has functioned after remove node_module folder. But i think it's don't work :(

I've add the task, but no result :

svg_sprite: {
    your_target: {
        src         : ['/images/*.svg'], // my svg files
        dest        : '/images/sprite', // dest folder
    }
}

If i start the task on my command, i see done, without errors 👍

grunt svg_sprite
Running "svg_sprite:your_target" (svg_sprite) task

Done, without errors.

I don't understand why :(

Please refer to the documentation and learn how to use grunt-svg-sprite. You need to pass a configuration object, otherwise you won't get any reasonable output. See the basic example as a starter.

Cheers, Joschi