node_modules/optipng-bin/vendor/optipng ENOENT
strever opened this issue ยท 8 comments
when run
$ gulp dev
Error: spawn /home/streverf/www/fancy/node_modules/optipng-bin/vendor/optipng ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
env:
$ npm -version
3.5.2
$ nodejs --version
v4.2.6
It seems like something is wrong with your gulp-imagemin plugin.
Try uninstall it and install it again.
npm uninstall gulp-imagemin
npm install gulp-imagemin
Make sure there are no errors during installation.
rm -rf node_modules
npm install
solve the problem.
probably because i run npm install
before npm install -g node-gyp
Yeah, imagemin depends on node-gyp.
Similar issue. I believe what worked for me was:
npm install node-gyp
npm uninstall gulp-imagemin
npm install gulp-imagemin
So, I think what they said above, just all in one post.
npm rebuild solve it here!
Same issue here. uninstall/reinstall of gulp-imagemin fixed symptoms. npm install hadn't previously reported any issues with the install. node-gyp installed.
Not sure if there is some hidden instability in package dependencies as my gulp task had been running fine in the same environment/project then spuriously stopped working. I'm not sure what had changed to introduce error.
<project>\node_modules\optipng-bin\vendor\optipng.exe
folder and executable were missing, yielding the error/stacktrace:
Error: The system cannot find the path specified.
at notFoundError (<project>\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (<project>\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (<project>\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
npm rebuild
works for me.
None of the solutions worked for me. Any other recommendations. Warning: Error: spawn /applic/node_modules/optipng-bin/vendor/optipng ENOENT