Troubleshooting

cf deploy --mode fails with Nuxt

cf 1.0.0-beta.5 can reject --mode before invoking a detected Nuxt build. The upstream report is open; retaining the working Wrangler deployment is the reported workaround.

Beta tooling changes quickly. Examples are checked against cf 1.0.0-beta.5 and @cloudflare/config 0.20.0. See the sources below.

The problem

The upstream report describes a Nuxt 4 project using Nitro’s Cloudflare module preset. Adding --mode causes cf to stop before the framework build runs, including when a dry run is requested.

Example error

Error
The detected command `pnpm nuxt build` does not currently support `--mode`.

Why it happens

The current build implementation checks whether the detected framework supports a mode argument. It rejects an explicitly requested mode when that capability is absent. This is a framework delegation limitation, not evidence that the application’s TypeScript configuration is invalid.

Current workaround

The issue author reports keeping deployment on Wrangler with an existing, configured environment:

Terminal
npx wrangler deploy --env preview

This command assumes the project already has a working Wrangler configuration for preview. It does not translate a new cf configuration back to Wrangler. Preserve and review that original deployment target before running it.

Removing --mode may change which configuration branch is selected. It is not an equivalent staging workaround. Likewise, --prebuilt requires standardized Build Output; ordinary Nitro output alone is insufficient.

Status

Open when checked on September 29, 2026. Source report: cloudflare/cf issue #45. This site reviewed the report and the beta build implementation; it has not reproduced a remote Nuxt deployment.

Check the issue and your installed version again before using this advice. See cf deploy for Build Output requirements and cf vs Wrangler for the transition context.

Sources & verification

Upstream report: cloudflare/cf #45Framework mode guard in cf build