在“next.config.js”中找不到“exportPathMap”。从“./pages”生成地图

将 Next.js 部署到 Netlify 时出现此错误。

Error: Image Optimization using Next.js default loader is not compatible with `next export`.

Possible solutions:

6:47:15 AM:   - Use `next start`, which starts the Image Optimization API.
6:47:15 AM:   - Use Vercel to deploy, which supports Image Optimization.
6:47:15 AM:   - Configure a third-party loader in `next.config.js`.
6:47:15 AM:  -  Read more: https://err.sh/next.js/export-image-api.
6:47:15 AM:   at exportApp (/opt/build/repo/node_modules/next/dist/export/index.js:14:712)

部署到 Vercel 时不会出现此问题。

回答

似乎您使用下一个/图像。但next/images不要与静态页面(与生成的工作next export)对于静态页面中使用这个图像优化:下一个优化的图像,而不是


以上是在“next.config.js”中找不到“exportPathMap”。从“./pages”生成地图的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>