Skip to content

Assets-only workers broken by assets validation #14018

@kevinji

Description

@kevinji

Describe the bug

The validation in #13844 broke assets-only workers, which do not specify binding = "ASSETS". If you include that, you get the error "[ERROR] Cannot use assets with a binding in an assets-only Worker." from wrangler. However, without a binding, you get "Error: You must specify the assets.binding key in /opt/buildhome/repo/wrangler.toml. Consult https://developers.cloudflare.com/workers/static-assets/binding/#binding"

Reproduction

Create a wrangler.toml including binding = "ASSETS" under [assets] but no main key.

Logs

System Info

System:
    OS: macOS 15.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.31 GB / 64.00 GB
    Shell: 5.9 - /run/current-system/sw/bin/zsh
  Binaries:
    Node: 22.16.0 - /nix/store/abxz7wpw5kwaijzzmf8rl4ga981vk8pc-nodejs-22.16.0/bin/node
    npm: 10.9.2 - /nix/store/abxz7wpw5kwaijzzmf8rl4ga981vk8pc-nodejs-22.16.0/bin/npm
    pnpm: 9.15.0 - /nix/store/6ay4p54n66jj9npcn362djdhbb5cwi7a-corepack-nodejs-22.16.0/bin/pnpm
  Browsers:
    Chrome: 138.0.7204.158
    Safari: 18.5
  npmPackages:
    @sveltejs/adapter-cloudflare: ^7.0.5 => 7.0.5
    @sveltejs/enhanced-img: ^0.6.1 => 0.6.1
    @sveltejs/kit: ^2.25.1 => 2.25.1
    @sveltejs/vite-plugin-svelte: ^6.1.0 => 6.1.0
    svelte: ^5.36.8 => 5.36.8
    vite: ^7.0.5 => 7.0.5

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions