Skip to content
Playground(another site)

bynk.deploy.binding_collision

Error Two members of one [deploy.workers.<key>] group declare different bindings under the same name; members share one wrangler.toml, so identical declarations share a binding and differing ones are refused.

A [deploy.workers.<key>] group folds its members into one Worker, and a Worker has one wrangler.toml, so its members share one set of binding names. Two members that declare a binding the same way share it. Two that declare different bindings under one name are refused, because one name cannot bind two things. An agent is the usual case: each agent class is a Durable Object binding named after the class, and a class belongs to the context that declares it, so two members cannot each declare an agent of the same name. Rename one, or put the contexts in different groups.

Example

bynk.toml
[deploy.workers.core]
contexts = ["shop.orders", "shop.billing"]
// shop/orders.bynk
agent Cart { … }
// shop/billing.bynk
agent Cart { … } // ✗ `shop.orders` already binds `Cart`
agent Ledger { … } // ✓

In the Book

See also

  • Every code in its category, Deployment, on the diagnostic index.
  • bynk explain bynk.deploy.binding_collision shows the same from the installed toolchain, without a network.