next-on-pages
next-on-pages copied to clipboard
[⚡ Feature]: Support Next.js 15
Description
In the next-on-pages documentation I read the following:
Supported Next.js versions
@cloudflare/next-on-pagessupports all minor and patch version of Next.js 13 and 14. We regularly run manual and automated tests to ensure such compatibility.Next.js canary versions not actively being tested and we don't currently extend support to these versions.
Is Next.js 15 support coming soon?
Additional Information
No response
Would you like to help?
- [ ] Would you like to help implement this feature?
This adapter won't be introducing official support. Please use the OpenNext adapter if you would like to use Next.js 15.
This adapter won't be introducing official support. Please use the OpenNext adapter if you would like to use Next.js 15.
The official cloudflare docs mention to use next-on-pages for deployment, why wouldn't NextJS 15 get official support? Is this library still maintained?
This adapter won't be introducing official support. Please use the OpenNext adapter if you would like to use Next.js 15.
The official cloudflare docs mention to use next-on-pages for deployment, why wouldn't NextJS 15 get official support? Is this library still maintained?
This library is being superseded by the OpenNext adapter.
@antonio0 no need to use Open Next it's not maintained by Cloudflare. james-elicx does not work at Cloudflare and cannot comment on Cloudflare not supporting Next.js. v 15.
Next On Pages works till 15.1.7. I'de advise to close this issue with comment "already supported". @penalosa I think this can be closed.
@antonio0 no need to use Open Next it's not maintained by Cloudflare. james-elicx does not work at Cloudflare and cannot comment on Cloudflare not supporting Next.js. v 15.
The OpenNext adapter is maintained by both Cloudflare and community contributors, similarly to this one. I can confirm that it supersedes next-on-pages and that next-on-pages will not be officially supporting Next.js 15 as I work with the team at Cloudflare on both projects.
In case you hadn't seen it, the OpenNext adapter was announced as the replacement on the Cloudflare blog last year - https://blog.cloudflare.com/builder-day-2024-announcements/#cloudflare-joins-opennext
@antonio0 no need to use Open Next it's not maintained by Cloudflare. james-elicx does not work at Cloudflare and cannot comment on Cloudflare not supporting Next.js. v 15.
Next On Pages works till 15.1.7. I'de advise to close this issue with comment "already supported". @penalosa I think this can be closed.
To be honest, before opening this issue, I've read comments online about some people saying they've managed to run Next 15 on next-on-pages (and others that haven't and gave up), however I wouldn't class that the same as "supported". I wouldn't simply close it with no action. To me supported means:
- the official docs declares that version is supported, which it currently doesn't (at packages/next-on-pages/docs/supported.md)
- the tests suite passes (I haven't personally tried them to comment on that)
If Cloudflare's team doesn't intend to put the effort to do so then I believe this information should be shared in the docs rather than buried into a closed GitHub issue. Ambiguity and uncertainty don't seem to me something that makes a good impression with your paying customers.
For context, my team has been a CF Pages customer for years, we've been on Next 13 and upgraded to 14 fairly easily, we needed 15 for compatibility with another package and thought to ourselves "Next 15 has been out for months, it's probably going to work by now". It turned out many things are not working so we turned to the docs to find out about lacking support and an uncertain future for Next-on-pages alongside its alternative OpenNext (mainly thanks to @james-elicx comments on various issues). We're happy with the Edge Runtime and don't need the extra features however we would like to get official answers before deciding between putting time and effort towards migrating to OpenNext or fix all the issues encountered during our upgrade with Next-On-Pages (I know this may sound polemic but our reasoning is: 15.1 may work as you say, but if 15.2 or 15.3 doesn't, will CF even try to make it work when they couldn't be bothered to update the docs after months of 15.0 being out?).
@james-elicx
Starting today, as an early developer preview, you can use OpenNext to deploy Next.js apps to Cloudflare Workers via @opennextjs/cloudflare, a new npm package that lets you use the Node.js “runtime” in Next.js on Workers.
This new adapter is powered by our new Node.js compatibility layer, newly introduced Static Assets for Workers, and Workers KV, which is now up to 3x faster. It unlocks support for Incremental Static Regeneration (ISR), custom error pages, and other Next.js features that our previous adapter, @cloudflare/next-on-pages, could not support, as it was only compatible with the Edge “runtime” in Next.js.
I don't see it announced as a replacement, rather an option if you want to run the node.js runtime.
@penalosa @dario-piotrowicz could you confirm if cloudflare won't be supporting next-on-pages?
next-on-pages works badly on Next 15.2 and throws __import_unsupported related TypeError.
I want to know:
- whether Next 15 will be continously supported
- whether OpenNext will take place of next-on-pages finally, encouraging developers to migrate to OpenNext
Cloudflare Workers don’t seem to differentiate between dev and prod environments like Pages does. Can anyone tell me how to make OpenNext run separately in dev and prod environments? I’d be happy to migrate to OpenNext if that’s possible.
Things happen so fast
means reverting to next 14 or giving up next-on-pages?
Things happen so fast
means reverting to next 14 or giving up next-on-pages?
Cloudflare mitigated this vulnerability through its WAF rule: https://developers.cloudflare.com/changelog/2025-03-22-next-js-vulnerability-waf/
None any update to resolve ??
So basically it will be not possible to run nextjs 15 as cloudflare page, only as worker. Which is a bummer.
I've been trying to get nextjs 15 to work with cloudflare pages and every page i use export const runtime = "edge"; the page breaks with internal server error. Is there no way to debug this? or is this CF issue.
See https://github.com/cloudflare/next-on-pages/pull/960
Cloudflare Workers don’t seem to differentiate between dev and prod environments like Pages does. Can anyone tell me how to make OpenNext run separately in dev and prod environments? I’d be happy to migrate to OpenNext if that’s possible.
https://developers.cloudflare.com/workers/configuration/versions-and-deployments/#create-a-new-version. It isn't out of the box, but you can customize it more than pages from what I'm reading.
Correct me if I'm wrong; wouldn't using OpenNext mean you're having to use NextJS on Workers platform meaning static assets (including images, and rendered HTML) would be counted towards requests? If so, whats the work around?
See docs
https://developers.cloudflare.com/workers/static-assets/billing-and-limitations/
cc @korinne
Hello 🙂 Thank you for the issue and apologies for the late reply.
Earlier this year we released our Cloudflare adapter for OpenNext, and we have been continuously investing effort in its improvement since then. Existing deployments can continue to use the next-on-pages tooling, but the Cloudflare adapter for OpenNext is currently stable and recommended for deployment of Next.js applications to Cloudflare.
As such, we will no longer be maintaining next-on-pages. We recently deprecated the package on npm and we plan to archive this repo on Monday Sep 29, 2025. In preparation for archival, we are closing all open issues and PRs.
If you have concerns, please feel free to reply here before the repo is archived (after that, it will no longer be possible to comment) or to reach out to our team on Discord.
Thanks so much for using and contributing to next-on-pages 🧡