Gulp-imagemin fails when running "build" task

I am getting an error on the “images” task but only when running npm run build . If I run the default gulp task, it works fine. I’m running node version 10.6.3, npm version 6.13.7 and am on Windows 10. I’ve deleted and re-installed the node_modules folder several times to no avail. The error says it can’t find the path specified (…node_modules/imagemin-jpetran/node_modules/jpegtran-bin/vendor/jpegtran.exe). Looking in that folder, I don’t have the “vendor” folder so I’ve tried re-installing this package but “vendor” never gets created and I don’t get any errors on installation. I don’t think this is “Foundation” issue but was just wondering if anyone else has had this issue and what you did to resolve it. For now, my work-around is to just comment out “images” in the build task. Thanks for any input!


Hi Jason,

please provide the full error message with stacktrace that you get.
This is probrably an issue with your Node setup and environment and some error in imagemin-jpetran or jpegtran-bin.

The exe file should be built or downloaded when you install the dependencies.

See and✓&q=is%3Aissue+is%3Aclosed+jpegtran.exe