Skip to content
Playground(another site)

bynk.asset.unsafe_path

Error An asset path is empty, absolute, or contains a .. segment.

An asset's path must stay inside the project: it may not be empty or absolute, and it may not contain a .. segment. Assets are public, so a path that starts at the filesystem root or climbs out of the project could publish a file that was never meant to ship. Write the path relative to the project root, inside assets/. A relative path that is only outside assets/ is bynk.asset.outside_assets_dir.

Example

asset style = "assets/../board.css" // ✗ a `..` segment
asset style = "assets/board.css" // ✓

In the Book

See also

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