mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #219] vinext deploy fails with wrangler error: assets config missing required directory property when using output: "export" in next.config.ts #53
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vikas5914 on GitHub (Mar 1, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/219
Originally assigned to: @james-elicx on GitHub.
Description
When using
output: "export"innext.config.ts(static export mode), runningvinext deployfails during the wrangler deploy step. The build completes successfully (all 5 steps), but wrangler rejects the config because theassetsproperty is missing the requireddirectoryfield.This happens because
vinext deploygenerates (or scaffolds) awrangler.jsoncwith anassetsblock that does not includedirectory. Wrangler 4.69.0 requires this field whenassetsis present.Steps to Reproduce
output: "export"innext.config.ts:bunx vinext deployError Output
Environment
next.config.tswrangler.jsonc(generated by vinext)@nathanschram commented on GitHub (Mar 13, 2026):
Hey - ran into this same thing looking at vinext's deploy path. I think the issue is in
generateWranglerConfig()inpackages/vinext/src/deploy.ts- it looks like it generates theassetsblock withnot_found_handlingandbindingbut doesn't includedirectory, which wrangler 4.69.0+ requires whenassetsis specified as an object.From reading the source, it looks like vinext v0.0.17 doesn't have a static export code path yet -
detectProject()doesn't appear to readnext.configat all, sooutput: "export"seems to be effectively ignored. The build still seems to run the standard Worker pipeline (which would explain why your 5 build steps succeed), but then wrangler rejects the generated config at deploy time.There's already a PR in progress (#221) that should add proper static export support -
directoryin the config, a static export build pipeline, and skipping Worker-only deps. It's still in draft but the approach looks right.In the meantime, a couple of workarounds depending on what you're after:
If you actually need SSR/edge rendering - removing
output: "export"from next.config.ts should let vinext do a normal Worker deploymentIf you specifically want a static site - you could probably bypass vinext entirely and go straight through Cloudflare Pages:
next build && npx wrangler pages deploy ./out. Pages is purpose-built for static assets so you shouldn't need the Worker wrapper at all@james-elicx commented on GitHub (Mar 13, 2026):
Aiming to ship proper pre-rendering support towards the tail end of this weekend, and closely follow that with the fixes for this.