Experience feedback: deploying via the Cloudflare dashboard (Workers Builds)
When deploying a vinext app to Cloudflare Workers through Cloudflare's web dashboard Git integration ("Create Worker → connect repo" / Workers Builds), the UI splits the pipeline into two fields — a Build command and a Deploy command (where the deploy step is wrangler deploy). This split model fights vinext's all-in-one vinext deploy.
What goes wrong
Approach A — Build = vinext build (or a build:vinext script), Deploy = npx wrangler deploy:
wrangler deploy needs a wrangler.jsonc + worker entry, which don't exist in the repo until vinext generates them. So it either fails or forces you to hand-commit the config.
Approach B — let the dashboard auto-configure the framework:
It detects next and applies @opennextjs/cloudflare (OpenNext) instead of vinext, running @opennextjs/cloudflare migrate — which then fails on yarn 1.x because migrate internally calls yarn dlx (not a yarn-classic command):
🛠️ Configuring project for Next.js with OpenNext by running `@opennextjs/cloudflare migrate`
? Proceed with setup? 🤖 Using fallback value in non-interactive context: yes
yarn run v1.22.22
error Command "dlx" not found.
✘ [ERROR]
Failed: error occurred while running deploy command
What actually works
In the dashboard, leave the Build command empty (it's marked optional) and set the Deploy command to npx vinext deploy. vinext's one-command deploy then generates its own config, builds, and deploys — no OpenNext, no missing-config error.
Caveats hit along the way
vinext deploy runs vinext build internally, which does not run any custom prebuild step. If your real build does extra work (e.g. node scripts/downloadFonts.mjs for self-hosted fonts), it's silently skipped — you must replicate it in the optional Build command.
vinext deploy --skip-build exists to bridge "build separately, then deploy", but it's confusing in the dashboard context: it only makes sense because vinext deploy is an all-in-one command shoehorned into a deploy-only slot.
Suggestions
- Document the Cloudflare dashboard deploy path explicitly (current guidance assumes the CLI). Recommend: empty Build command +
vinext deploy as the Deploy command.
- Detect/avoid Cloudflare's OpenNext auto-setup, or at least note the conflict.
- Consider a documented build/deploy split story (when to commit the generated
wrangler.jsonc + use wrangler deploy, vs. one-shot vinext deploy).
Environment: vinext 0.1.8 · yarn 1.22.22 · Cloudflare Workers Builds (dashboard Git integration).
Experience feedback: deploying via the Cloudflare dashboard (Workers Builds)
When deploying a vinext app to Cloudflare Workers through Cloudflare's web dashboard Git integration ("Create Worker → connect repo" / Workers Builds), the UI splits the pipeline into two fields — a Build command and a Deploy command (where the deploy step is
wrangler deploy). This split model fights vinext's all-in-onevinext deploy.What goes wrong
Approach A — Build =
vinext build(or abuild:vinextscript), Deploy =npx wrangler deploy:wrangler deployneeds awrangler.jsonc+ worker entry, which don't exist in the repo until vinext generates them. So it either fails or forces you to hand-commit the config.Approach B — let the dashboard auto-configure the framework:
It detects
nextand applies@opennextjs/cloudflare(OpenNext) instead of vinext, running@opennextjs/cloudflare migrate— which then fails on yarn 1.x because migrate internally callsyarn dlx(not a yarn-classic command):What actually works
In the dashboard, leave the Build command empty (it's marked optional) and set the Deploy command to
npx vinext deploy. vinext's one-command deploy then generates its own config, builds, and deploys — no OpenNext, no missing-config error.Caveats hit along the way
vinext deployrunsvinext buildinternally, which does not run any custom prebuild step. If your real build does extra work (e.g.node scripts/downloadFonts.mjsfor self-hosted fonts), it's silently skipped — you must replicate it in the optional Build command.vinext deploy --skip-buildexists to bridge "build separately, then deploy", but it's confusing in the dashboard context: it only makes sense becausevinext deployis an all-in-one command shoehorned into a deploy-only slot.Suggestions
vinext deployas the Deploy command.wrangler.jsonc+ usewrangler deploy, vs. one-shotvinext deploy).Environment: vinext 0.1.8 · yarn 1.22.22 · Cloudflare Workers Builds (dashboard Git integration).