Npm module "grunt-contrib-imagemin" not found, Is it installed?

jsidera picture jsidera · Nov 11, 2013 · Viewed 19.3k times · Source

I run into this error, when I try to do build a project with "grunt build".

Screenshot

There seems to be no problem when I test the project by doing "grunt server".

The project has been scaffolded and managed with: yeoman/grunt/bower. In Windows.

Everything went well and then a week ago or so it started doing this. I can't build projects no more.

When I try to install the module doing:

npm install grunt-contrib-imagemin

It can never install it, get the following "weird" error.

enter image description here

Any hints please?

Answer

jsidera picture jsidera · Nov 11, 2013

Ok I found a way to solve this:

  • In your package.json, add "jpegtran-bin": "0.2.0" before the reference to imagemin
  • Delete the node_modules folder in your project, and run "npm install" and "bower install" again

There seem to be an issue with the jpegtran's latest version.

!! - Please note this is just a workarround waiting for the bugfix.