I've been struggling for hours trying to deploy my Next.js application to Cloudflare Workers and Pages, and it's been a total nightmare. I tried various libraries, including OpenNext, but nothing worked out. Eventually, I gave up and decided to deploy it to Vercel instead, and it worked on my first try. I'm just curious—what's the deal with Cloudflare? Why is it such a hassle compared to other platforms?
4 Answers
If you're set on using Cloudflare, you might want to look into using next-on-pages along with edge-safe dependencies and KV/R2 for ISR. It’s different from the model Vercel uses, which can be confusing, but it’s effective.
Vercel is essentially tailored for Next.js, so it tends to offer a smoother experience there. They have an incentive to keep their platform user-friendly because it attracts customers to their hosting services. That's one reason why I’m hesitant about Next.js—there’s a constant concern they'll focus on their own platform over others.
I switched to Railway after having so many issues with Cloudflare and haven’t regretted it since. It just seems like a more straightforward option.
Exactly! Vercel feels like home for Next.js. It just works seamlessly there. But when you’re trying Cloudflare, you have to deal with extra layers like adapters, such as OpenNext or managing edge runtimes. If you're opting for Cloudflare due to cost or performance, be ready to invest some time in setup.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically