Skip to content
Playground(another site)

bynk.asset.duplicate

Error An asset name is declared more than once in the same unit.

An asset is a name for a file, read as a value (style.url), so a unit declares each name once: a second asset style would leave style meaning two files. Give each asset its own name, or drop the repeat when it names the same file. An asset whose name is a function's or a type's is bynk.resolve.name_conflict instead.

Example

asset style = "assets/board.css"
asset style = "assets/print.css" // ✗ `style` is already declared
asset style = "assets/board.css"
asset print = "assets/print.css" // ✓ one name each

In the Book

See also

  • Every code in its category, Static assets, on the diagnostic index.
  • bynk explain bynk.asset.duplicate shows the same from the installed toolchain, without a network.