gulp-imagemin icon indicating copy to clipboard operation
gulp-imagemin copied to clipboard

7.1.0: npm run build results with TypeError in plugin "gulp-imagemin" when running docker-compose on Apple Silicon device

Open karolpawlowski opened this issue 3 years ago • 3 comments

I'm just trying to run my project on a new laptop with Apple Silicon chip. It is dockerised, so I thought there shouldn't be many problems. I encountered this one with gulp-imagemin in 7.1.0 version when running npm run build:

#31 13.93 [14:19:40] TypeError in plugin "gulp-imagemin"
#31 13.93 Message:
#31 13.93     fn is not a function
#31 13.93 Details:
#31 13.93     fileName: /frontend/app/img/ui/cluster_1.svg
#31 13.93     domainEmitter: [object Object]
#31 13.93     domainThrown: false
#31 13.93 

I solved it by changing version to 8.0.0 but then got this error https://github.com/sindresorhus/gulp-imagemin/issues/366 with require() of ES modules is not supported

Does anyone faced this problem? I think I should stick with 7.1.0 version, but why it doesn't work?

karolpawlowski avatar Jan 07 '22 14:01 karolpawlowski

I met the trouble like this, too.

jerryoung avatar Feb 04 '22 07:02 jerryoung

I met the trouble like this, too.

ikangjie avatar Apr 12 '22 09:04 ikangjie

This older version helped me to solve this problem: npm install --save-dev [email protected]

alienat3d avatar May 19 '23 08:05 alienat3d