Skip to content

Can’t Bind Additional R2 Buckets in NuxtHub #655

@Alecyrus

Description

@Alecyrus

Describe the bug
When trying to add an extra R2 binding in NuxtHub using the following configuration:

// nuxt.config.ts
hub: {
  ai: true,
  database: true,
  kv: true,
  blob: true,
  cache: true,
  workers: true,
  bindings: {
    // @ts-ignore
    r2_bucket: {
      RAG_STORE: {
        bucket_name: "test-rag-store",
      },
    },
  },
}

the binding does not take effect. When I print event.context.cloudflare.env, the output is always:

{ CACHE: ProxyStub { name: 'KvNamespace', poisoned: false } }

No R2 bucket appears in the environment.

Steps to reproduce

  1. Add the above configuration to your NuxtHub setup.
  2. Deploy and log event.context.cloudflare.env.
  3. Observe that only CACHE is present, with no R2 bindings.

Expected behavior
I expect the R2 bucket (RAG_STORE) to show up in event.context.cloudflare.env, allowing direct access to the bound R2 store.

Additional context

  • Using the latest NuxtHub core version.
  • Other bindings (KV, cache) work as expected.
  • No errors during deployment, but R2 is missing from the environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions