I’m running into an issue when I add .gifs to my images folder. The build seems to die when I do so. When I remove the .gifs it runs just fine.
Here is the error that gets returned.
throw er; // Unhandled ‘error’ event
Error: spawn /Users/Robert/Sites/magnetry/wp-content/themes/magnetry/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/vendor/gifsicle ENOENT
at exports._errnoException (util.js:837:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
I reinstalled the ‘imagemin-gifsicle’ module in the subdirectory located here ‘node_modules/gulp-imagemin/node_modules/imagemin/node_modules/’ and all was fixed.
Sure why not
Leaving this here in case it helps.
Thanks for posting the fix for others. It really helps forums like ours.
I had the same problem. When running gulp for the first time it threw an ENOENT error for
gifsicle. I had to delete the folder and re-run
Then the same thing happened with
optipng. After doing the same thing (deleting the folder and re-running
npm install) gulp completed.
Any idea why these modules would install incorrectly the first time round but install correctly on the second?
Optipng seems to have failed looking for a folder that doesn’t exist:
After reinstalling this doesn’t exist, but no error is thrown.