Проблема в файле gulpfile.js если задать
const imagemin = require('gulp-imagemin');
function images() {
return src('app/images/**/*.*')
.pipe(imagemin())
.pipe(dest('dist/images'))}
exports.images = images;
выдает ошибку:
gulp images
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/slavaakuratov/Documents/Training/frontend_developer/Task/start_gulp/node_modules/gulp-imagemin/index.js from /Users/slavaakuratov/Documents/Training/frontend_developer/Task/start_gulp/gulpfile.js not supported.
Instead change the require of index.js in /Users/slavaakuratov/Documents/Training/frontend_developer/Task/start_gulp/gulpfile.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/slavaakuratov/Documents/Training/frontend_developer/Task/start_gulp/gulpfile.js:7:27) {
code: 'ERR_REQUIRE_ESM'