我搜索了这个错误的原因并发现我必须使用sudo更改权限或运行gulp,但仍然会遇到相同的错误。 任何人都可以帮忙......
内部/ child_process.js:298 throw errnoException(错误,'spawn'); ^
错误:产生EACCES at exports._errnoException(util.js:870:11) 在ChildProcess.spawn(internal / child_process.js:298:11) 在exports.spawn(child_process.js:362:9) 在exports.execFile(child_process.js:151:15) 在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 在FSReqWrap.oncomplete(fs.js:82:15)
答案 0 :(得分:34)
看起来您没有运行某些文件的权限, 尝试在项目的根路径上键入next命令:
chmod -R u+x .
如果现在已修复,则必须找到哪些文件具有不正确的权限。 如果要撤消更改以查找有问题的文件,请键入next命令:
git checkout -- .