我搜索了这个错误的原因,发现我必须更改权限或使用sudo运行gulp,但仍然得到相同的错误.谁能请帮忙...
internal/child_process.js:298 throw errnoException(错误,'spawn'); ^
错误:在exports.execFile上的exports.spawn(child_process.js:362:9)的ChildProcess.spawn(internal/child_process.js:298:11)的exports._errnoException(util.js:870:11)处生成EACCES( 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)/ 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在FSReqWrap的/var/www/conFusion/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js:42:10. oncomplete(fs.js:82:15)
看起来您没有运行某些文件的权限,请尝试在项目的根路径中键入next命令:
chmod -R u+x .
如果现在已修复,则必须找到哪些文件具有不正确的权限.如果要撤消更改以找到有问题的文件,请键入next命令:
git checkout -- .