Answer the question
In order to leave comments, you need to log in
Error when trying to run next export?
Hello, tell me why there is an error when executing the script next build && next export
I will be grateful for the answer
Error: Image Optimization using Next.js' default loader is not compatible with `next export`.
Possible solutions:
- Use `next start` to run a server, which includes the Image Optimization API.
- Use any provider which supports Image Optimization (like Vercel).
- Configure a third-party loader in `next.config.js`.
- Use the `loader` prop for `next/image`.
Read more: https://nextjs.org/docs/messages/export-image-api
at C:\Users\Admin\Desktop\New folder\node_modules\next\dist\export\index.js:14:785
at async Span.traceAsyncFn (C:\Users\Admin\Desktop\New folder\node_modules\next\dist\telemetry\trace\trace.js:6:584)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `next build && next export`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache\_logs\2021-07-21T16_58_01_134Z-debug.log
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question