1000ch / gulp-image

Optimize PNG, JPEG, GIF, SVG images with gulp task.
http://bit.ly/we-should-optimize-images
MIT License
223 stars 22 forks source link

6.3.1 doesn't work with the esm module loader #141

Closed philipmarnef closed 1 year ago

philipmarnef commented 2 years ago

Possibly related to #139

When using esm, gulp-image 6.3.1 throws an error on all node versions I tried (14, 16 & 17):

[10:33:08] Requiring external module esm
TypeError: Invalid host defined options
    at eval (eval at <anonymous> (/Users/philipmarnef/Sites/xxxxxxxx/node_modules/gulp-cli/lib/shared/require-or-import.js:10:15), <anonymous>:3:1)
    at requireOrImport (/Users/philipmarnef/Sites/xxxxxxxx/node_modules/gulp-cli/lib/shared/require-or-import.js:24:7)
    at execute (/Users/philipmarnef/Sites/xxxxxxxx/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:37:3)
    at Liftoff.handleArguments (/Users/philipmarnef/Sites/xxxxxxxx/node_modules/gulp-cli/index.js:211:24)
    at Liftoff.execute (/Users/philipmarnef/Sites/xxxxxxxx/node_modules/liftoff/index.js:201:12)
    at module.exports (/Users/philipmarnef/Sites/xxxxxxxx/node_modules/flagged-respawn/index.js:51:3)
    at Liftoff.<anonymous> (/Users/philipmarnef/Sites/xxxxxxxx/node_modules/liftoff/index.js:191:5)
    at /Users/philipmarnef/Sites/xxxxxxxx/node_modules/liftoff/index.js:149:9
    at /Users/philipmarnef/Sites/xxxxxxxx/node_modules/v8flags/index.js:162:14
    at /Users/philipmarnef/Sites/xxxxxxxx/node_modules/v8flags/index.js:41:14

Downgrading to 6.2.1 solves the issue.

ahoran3 commented 2 years ago

downgrading to 6.2.1 has a broken dependency: SVGO.

svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.

philipmarnef commented 1 year ago

esm is now obsolete, removing it solved the issue