Next.js deployed failed on getStaticPath page

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

1 Like

Is it solved?

No. I gave up on Cloudflare.
I tried both the export way and the deploy way and there are errors that I cannot fix. It seems Vercel is still much better, unfortunately.

1 Like

Thank you for your kindreply