Menu icon Foundation
Image causes error in gulp-imagemin

When I drop an image in the img directory under src, I receive the following:
Error in plugin 'gulp-imagemin:'
Message: spawn d:\mail\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\vendor\jpegtran.exe ENOENT

Ok, I changed dir to \mail\node_modules\gulp-imagemin\node_modules\imagemin\ and unistalled imagemin-jpegtran with
npm uninstall imagemin-jpegtran. Then installed again: npm install imagemin-jpegtran.
Fine, now it is working, the image is minified and the gulp process is not terminated any more.

But now there is a lot more stuff in \mail\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\.
Why does that happen? Any better idea?

And finally I assume, that I has to do it with the other imagemins (gifsicle, optipng and svgo), too.

 

____________________________________________________________________________________________________

Gulp-babel and babel-preset-es2015 are definitely missing in new site and mail projects."Failed to load external module babel-register"
npm install gulp-babel babel-preset-es2015 --save-devfrom the Upgrading to Foundation 6.2 page does the trick.

Foundation CLI version 2.1.0 under Windows 7, Node 5.5.0, npm 3.3.12, foundation-sites 6.2.0, foundation-emails 2.0.0, foundation-apps-template 1.2.0
And don't use weird characters in directory names. I despaired, until I realized it was an exclamation mark.

cliemailsimagemin

When I drop an image in the img directory under src, I receive the following:
Error in plugin 'gulp-imagemin:'
Message: spawn d:\mail\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\vendor\jpegtran.exe ENOENT

Ok, I changed dir to \mail\node_modules\gulp-imagemin\node_modules\imagemin\ and unistalled imagemin-jpegtran with
npm uninstall imagemin-jpegtran. Then installed again: npm install imagemin-jpegtran.
Fine, now it is working, the image is minified and the gulp process is not terminated any more.

But now there is a lot more stuff in \mail\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\.
Why does that happen? Any better idea?

And finally I assume, that I has to do it with the other imagemins (gifsicle, optipng and svgo), too.

 

____________________________________________________________________________________________________

Gulp-babel and babel-preset-es2015 are definitely missing in new site and mail projects."Failed to load external module babel-register"
npm install gulp-babel babel-preset-es2015 --save-devfrom the Upgrading to Foundation 6.2 page does the trick.

Foundation CLI version 2.1.0 under Windows 7, Node 5.5.0, npm 3.3.12, foundation-sites 6.2.0, foundation-emails 2.0.0, foundation-apps-template 1.2.0
And don't use weird characters in directory names. I despaired, until I realized it was an exclamation mark.

Rafi Benkual about 3 years ago

What type of images are you working with? svg, jpg, png, other?

There is an open issue for 'Failed to load external module babel-register' but it doesn't seem to affect anything.

Arkarys about 3 years ago

svg, jpg, png? Eventually all of them.

Just tried the CLI under Ubuntu with all three. No Problem with imagemin here, so it's a 'special' windows problem.

And, as I expected, it's not only a jpg problem but with png, too. (svg is working)
Here's the png error:
spawn d:\mail\node_modules\gulp-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\vendor\optipng.exe ENOENT

There must be something's going wrong while installation under windows, as there are no exe-files in the given directories.

However, as I said, after uninstall and new installation of the module, it works under windows, too.

 

According to the other issue with babel-register, I habe to admit, I was too quick pressing <strg>+c. In fact, it is running though. Thanks Rafi :)