Skip to content

vinext deploy fails with wrangler error: assets config missing required directory property when using output: "export" in next.config.ts #219

@vikas5914

Description

@vikas5914

Description

When using output: "export" in next.config.ts (static export mode), running vinext deploy fails during the wrangler deploy step. The build completes successfully (all 5 steps), but wrangler rejects the config because the assets property is missing the required directory field.

This happens because vinext deploy generates (or scaffolds) a wrangler.jsonc with an assets block that does not include directory. Wrangler 4.69.0 requires this field when assets is present.

Steps to Reproduce

  1. Create a Next.js App Router project with vinext
  2. Set output: "export" in next.config.ts:
    import type { NextConfig } from "next";
    
    const nextConfig: NextConfig = {
      output: "export",
    };
    
    export default nextConfig;
  3. Run bunx vinext deploy
  4. Build succeeds (all 5 steps complete), but deploy fails

Error Output

vinext deploy

  Project: vinext-static-out
  Router:  App Router
  ISR:     none

  Building for Cloudflare Workers...

[1/5] analyze client references...
...
[5/5] build ssr environment...
...

  Deploying to production...
Error: Command failed: .../node_modules/.bin/wrangler deploy

✘ [ERROR] The `assets` property in your configuration is missing the required `directory` property.

Environment

  • vinext: 0.0.17
  • wrangler: 4.69.0
  • vite: 7.3.1
  • next: 16.1.6
  • bun: latest
  • OS: macOS

next.config.ts

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  output: "export",
};

export default nextConfig;

wrangler.jsonc (generated by vinext)

{
  "$schema": "node_modules/wrangler/config-schema.json",
  "name": "vinext-static-out",
  "compatibility_date": "2026-03-01",
  "compatibility_flags": ["nodejs_compat"],
  "main": "./worker/index.ts",
  "assets": {
    "not_found_handling": "none",
    "binding": "ASSETS"
  },
  "images": {
    "binding": "IMAGES"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions