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

Support for imagemin-mozjpeg v10 #279

Open
simPod opened this issue Apr 5, 2022 · 2 comments
Open

Support for imagemin-mozjpeg v10 #279

simPod opened this issue Apr 5, 2022 · 2 comments

Comments

@simPod
Copy link

simPod commented Apr 5, 2022

Same as #264 but for mozjpeg.

I think the change is this one imagemin/imagemin-mozjpeg@9f3f702

Error [ERR_REQUIRE_ESM]: require() of ES Module /path/node_modules/imagemin-mozjpeg/index.js from /path/node_modules/next-optimized-images/lib/loaders/img-loader.js not supported.
Instead change the require of index.js in /path/node_modules/next-optimized-images/lib/loaders/img-loader.js to a dynamic import() which is available in all CommonJS modules.
at requireImageminPlugin (/path/node_modules/next-optimized-images/lib/loaders/img-loader.js:21:10)
at getImgLoaderOptions (/path/node_modules/next-optimized-images/lib/loaders/img-loader.js:42:11)
at applyImgLoader (/path/node_modules/next-optimized-images/lib/loaders/img-loader.js:96:28)
at appendLoaders (/path/next-optimized-images/lib/loaders/index.js:137:14)
at Object.webpack (/path/next-optimized-images/lib/index.js:62:24)
at Object.newWebpackFunction [as webpack] (/path/@sentry/nextjs/dist/config/webpack.js:39:40)
at Object.getBaseWebpackConfig [as default] (/path/next/dist/build/webpack-config.js:1176:32)
at async Promise.all (index 0)
at async Span.traceAsyncFn (/path/next/dist/trace/trace.js:79:20)
at async /path/next/dist/build/index.js:322:29
at async /path/next/dist/build/index.js:318:9
at async Span.traceAsyncFn (/path/next/dist/trace/trace.js:79:20)
at async Object.build [as default] (/path/next/dist/build/index.js:55:25) {
code: 'ERR_REQUIRE_ESM'
@zWarMob
Copy link

zWarMob commented Apr 8, 2022

@simPod
Temporary solution written in #270
Downgrade mozjpeg to 9.0.0

@simPod
Copy link
Author

simPod commented Apr 8, 2022

@zWarMob that is not a solution

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

2 participants