I’m having this error building with Cloudflare.
This project is created using this: npm create cloudflare@latest my-next-app – --framework=next
This project uses Page Directory next.js
All these paths have getStaticPaths function.
I tried to add export const runtime = ‘edge’ to these pages, it will complain Error: Page /news/[…id] provided runtime ‘edge’, the edge runtime for rendering is currently experimental. Use runtime ‘experimental-edge’ instead.
IF I swith to experimental-edge, it will complain > webpack config.resolve.alias was incorrectly overridden. https://nextjs.org/docs/messages/invalid-resolve-alias
Tried to add the export const runtime = ‘edge’ to layout, it build OK but failed on deployment.
Reproduction
Here is the minimum repo.
https://github.com/vader1359/next-cloudflare