Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V8 require() of ES modules is not supported #372

Open
weilinzung opened this issue Jun 11, 2022 · 8 comments
Open

V8 require() of ES modules is not supported #372

weilinzung opened this issue Jun 11, 2022 · 8 comments

Comments

@weilinzung
Copy link

weilinzung commented Jun 11, 2022

We have a custom build tool that used v7.1.0 but does not work with the M1 chip, same as #369.

Then we went to v8.0.0, then we got require() of ES modules is not supported error.

And because have to use commonjs to compile with another custom binary, so we can't change to es module for compiling.

Could we get some solutions you may suggest?

@thealiyasar
Copy link

same problem...

@thealiyasar
Copy link

I solved this problem by downgrading.

npm install --save-dev gulp-imagemin@7.1.0

Stay happy.

@weilinzung
Copy link
Author

weilinzung commented Jun 13, 2022

I solved this problem by downgrading.

npm install --save-dev gulp-imagemin@7.1.0

Stay happy.

With lately m1 chip we got fn is not a function with 7.1

@wang-xiaowu
Copy link

same question, but v7.1.0 is working
my computer's version

处理器	AMD Ryzen 7 4800U with Radeon Graphics            1.80 GHz
机带 RAM	16.0 GB (15.4 GB 可用)
系统类型	64 位操作系统, 基于 x64 的处理器

@meacodes
Copy link

I solved this problem by downgrading.

npm install --save-dev gulp-imagemin@7.1.0

Stay happy.

it's work for me to. thanks

@Luneldevwb
Copy link

Thanks, it's work for me.

@skeddles
Copy link

skeddles commented Jan 14, 2023

gulp-imagemin@7.1.0 has a security issue listed by npm audit

trim-newlines  <3.0.1
Severity: high
Uncontrolled Resource Consumption in trim-newlines - https://github.com/advisories/GHSA-7p7h-4mm5-852v

perhaps the maintainer could create a separate branch for version 7 so we could update it?

@theamnesic
Copy link

Hi!

Same here, I need help I can't make v8 works...

I can't find documentation except this.

My code doesn't return error but do not compile images :

function images(cb) {
  async () => {
    imagemin = await import('gulp-imagemin');
  },
  () => src([paths.images + '**/*'])
    .pipe(imagemin.default([
      imagemin.gifsicle({interlaced: true}),
      imagemin.mozjpeg({progressive: true}),
      imagemin.optipng({optimizationLevel: 5}),
    ]))
    .pipe(dest(paths.assets + paths.images))
    .pipe(livereload());
    cb();
}

exports.default = series(
  images,
);

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants