From d7b7a3c4e67176a03e6a4c63b7453c2728b81176 Mon Sep 17 00:00:00 2001 From: Roy Barber Date: Mon, 8 Dec 2025 14:48:33 +0000 Subject: [PATCH 1/4] NPX Command correction Update dev-deploy.mdx to insert the correct NPX commands to prevent a registry search failure if you copy and paste them into your cloudflare build settings --- pages/cloudflare/howtos/dev-deploy.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/cloudflare/howtos/dev-deploy.mdx b/pages/cloudflare/howtos/dev-deploy.mdx index f3e38a8..dee0cfa 100644 --- a/pages/cloudflare/howtos/dev-deploy.mdx +++ b/pages/cloudflare/howtos/dev-deploy.mdx @@ -74,5 +74,5 @@ You can then connect your GitHub repository by following [the documentation](htt In the Build settings: -- The "Build command" should be set to `npx opennextjs-cloudflare build`. -- The "Deploy command" should be set to `npx opennextjs-cloudflare deploy` (or `upload` to use gradual deployments). +- The "Build command" should be set to `npx @opennextjs/cloudflare build`. +- The "Deploy command" should be set to `npx @opennextjs-cloudflare deploy` (or `upload` to use gradual deployments). From 19746f6c8b1ff9ec8ef48bb951d43d816b7459e4 Mon Sep 17 00:00:00 2001 From: Roy Barber Date: Mon, 8 Dec 2025 14:52:53 +0000 Subject: [PATCH 2/4] Update index.mdx --- pages/cloudflare/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cloudflare/index.mdx b/pages/cloudflare/index.mdx index 5dcdedd..b9ddcf1 100644 --- a/pages/cloudflare/index.mdx +++ b/pages/cloudflare/index.mdx @@ -57,7 +57,7 @@ We welcome both contributions and feedback! The OpenNext Cloudflare adapter works by taking the Next.js build output and transforming it, so that it can run in Cloudflare Workers. -When you add [@opennextjs/cloudflare](https://www.npmjs.com/package/@opennextjs/cloudflare) as a dependency to your Next.js app, and then run `npx opennextjs-cloudflare` the adapter first builds your app by running the `build` script in your `package.json`, and then transforms the build output to a format that you can run locally using [Wrangler](https://developers.cloudflare.com/workers/wrangler/), and deploy to Cloudflare. +When you add [@opennextjs/cloudflare](https://www.npmjs.com/package/@opennextjs/cloudflare) as a dependency to your Next.js app, and then run `npx @opennextjs/cloudflare` the adapter first builds your app by running the `build` script in your `package.json`, and then transforms the build output to a format that you can run locally using [Wrangler](https://developers.cloudflare.com/workers/wrangler/), and deploy to Cloudflare. You can view the code for `@opennextjs/cloudflare` [here](https://github.com/opennextjs/opennextjs-cloudflare/blob/main/packages/cloudflare/src) to understand what it does under the hood. From b8ac1d91ab82bef70c01b29cf849db2277c1fba6 Mon Sep 17 00:00:00 2001 From: Roy Barber Date: Mon, 8 Dec 2025 14:53:38 +0000 Subject: [PATCH 3/4] Update troubleshooting.mdx --- pages/cloudflare/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cloudflare/troubleshooting.mdx b/pages/cloudflare/troubleshooting.mdx index 1869bde..b75e6f8 100644 --- a/pages/cloudflare/troubleshooting.mdx +++ b/pages/cloudflare/troubleshooting.mdx @@ -12,7 +12,7 @@ When deploying your Worker, `wrangler` will show both the original and compresse If your Worker is larger than 10 MiB compressed — there might be unnecessary code ending up in your production bundle. You can visualize and understand this by running: -1. `npx opennextjs-cloudflare build` within your project's root directory +1. `npx @opennextjs/cloudflare build` within your project's root directory 2. `cd .open-next/server-functions/default` to open the directory that contains the bundled code 3. Take the file named `handler.mjs.meta.json` and use the [ESBuild Bundle Analyzer](https://esbuild.github.io/analyze/) to visualize your application's code, and understand the largest parts of your production bundle From 117c4e53d9ce1f3ecfae4655945b795f5919c62d Mon Sep 17 00:00:00 2001 From: Roy Barber Date: Mon, 8 Dec 2025 14:54:22 +0000 Subject: [PATCH 4/4] Update dev-deploy.mdx --- pages/cloudflare/howtos/dev-deploy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/cloudflare/howtos/dev-deploy.mdx b/pages/cloudflare/howtos/dev-deploy.mdx index dee0cfa..d3e6acc 100644 --- a/pages/cloudflare/howtos/dev-deploy.mdx +++ b/pages/cloudflare/howtos/dev-deploy.mdx @@ -75,4 +75,4 @@ You can then connect your GitHub repository by following [the documentation](htt In the Build settings: - The "Build command" should be set to `npx @opennextjs/cloudflare build`. -- The "Deploy command" should be set to `npx @opennextjs-cloudflare deploy` (or `upload` to use gradual deployments). +- The "Deploy command" should be set to `npx @opennextjs/cloudflare deploy` (or `upload` to use gradual deployments).