Closed bitstarr closed 8 years ago
I had the same problem today. Try downgrading mozjpeg to version 5.1.0
Yup, grunt-contrib-imagemin
doesn't support the new plugin API in imagemin and probably won't for a foreseeable future since grunt
still supports deprecated versions of node
.
@kevva Thanks for your reply. With your expertise, do you think we can work around this issue to continue using grunt-contrib-imagemin ?
@MagazineduWebdesign, if you get stream.on is not a function
, try using the previous version of the plugin like @damy90 suggested.
@kevva Thanks for your reply. Nevertheless, I didn't manage the issue. I switched momentarily to grunt-image :disappointed:
I have the same problem too, and my mozjpeg's version is 6.0.0. I can't solve it. My solution is not using the mozjpeg plugin in imagemin task.
As suggested above downgrading "imagemin-mozjpeg" to 5.1.0 brings back functionality. Nonetheless i hope the issue will get fixed soon, so we can use the latest version.
Got this error :
Warning: spawn /www/node_modules/grunt-image/node_modules/jpeg-recompress-bin/vendor/jpeg-recompress EMFILE Use --force to continue.
Error: spawn /www/node_modules/grunt-image/node_modules/jpeg-recompress-bin/vendor/jpeg-recompress EMFILE
at exports._errnoException (util.js:873:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-cssmin": "^0.12.3",
"grunt-contrib-imagemin": "^1.0.1",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-less": "*",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-contrib-uglify": "~0.5.0",
"grunt-contrib-watch": "*",
"grunt-image": "^2.1.0",
"grunt-notify": "^0.4.5",
"gulp": "^3.9.1",
"gulp-imagemin": "^3.0.2",
"imagemin-mozjpeg": "^5.1.0",
"imagemin-pngquant": "^4.1.0"
},
I've got the same problem . I updated grunt to version "~1.0.0" and resolved.
Downgrading mozjpeg to 5.1.0 also fixed the issue for me, thanks!
I recently switched to mac and started my development there. imagemin task is failing on mac with the same issue but not on windows
Can anybody help me?
I recently initialized my project and npm got the latest version of grunt-contrib-imagemin.
I get the following error:
Running "imagemin:project" (imagemin) task Fatal error: stream.on is not a function
I don't know where to dig for a more exact error description. Can somebody please help?
package.json
grunt task: