Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yeaoman Grunt imagemin Fatal error: Cannot read property 'contents' of undefined

I keep on getting when running grunt build even with a clean Yeoman angular build: yo angular whatever.

Warning: Running "imagemin:dist" (imagemin) task

Fatal error: Cannot read property 'contents' of undefined

like image 211
Mika Avatar asked Jan 12 '16 12:01

Mika


2 Answers

just update your grunt-contrib-imagemin version.

Ex: "grunt-contrib-imagemin": "^0.9.2"

to

"grunt-contrib-imagemin": "^1.0.0"

it's work for me.

like image 83
Umair Ahmed Avatar answered Jan 03 '23 14:01

Umair Ahmed


I had to downgrade imagemin and it now all works.

npm cache clean && npm install [email protected]
like image 33
Mika Avatar answered Jan 03 '23 14:01

Mika