Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp error internal/child_process.js:298 throw errnoException(err, 'spawn'); Error: spawn EACCES

Tags:

gulp

I searched for the cause of this error and found that I have to change permissions or run gulp using sudo, but still got the same error. Can anyone please help...

internal/child_process.js:298 throw errnoException(err, 'spawn'); ^

Error: spawn EACCES at exports._errnoException (util.js:870:11) at ChildProcess.spawn (internal/child_process.js:298:11) at exports.spawn (child_process.js:362:9) at exports.execFile (child_process.js:151:15) at ExecBuffer. (/var/www/conFusion/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/exec-buffer/index.js:91:3) at /var/www/conFusion/node_modules/gulp-rev/node_modules/vinyl-file/node_modules/graceful-fs/graceful-fs.js:42:10 at /var/www/conFusion/node_modules/gulp-cache/node_modules/cache-swap/node_modules/graceful-fs/graceful-fs.js:42:10 at /var/www/conFusion/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js:42:10 at FSReqWrap.oncomplete (fs.js:82:15)

like image 245
Lee Rooy Avatar asked Jan 02 '16 04:01

Lee Rooy


1 Answers

It looks like you don't have permission to run some files, Try by typing next command on the root path of your project:

chmod -R u+x .

If it is fixed now you must find which files had the incorrect permissions. Type next command if you want to undo changes to find those problematic files:

git checkout -- .
like image 121
Fran Rios Avatar answered Oct 28 '22 11:10

Fran Rios