Skip to content
Playground(another site)

bynk.suite.env_not_literal

Error An env { … } entry's value is neither a String literal nor a fixture the same suite declares; a Worker's variables and secrets are strings, given verbatim.

A Worker's variables and secrets are strings, so an env entry's value must be a String literal, NAME = "value", or the name of a fixture the same suite declares. A number, a call or any other expression is refused, since the value is fixed when the suite is compiled. Write it as a string, and parse a number in the code that reads it.

Example

env {
RETRIES = 3 // ✗ not a `String`
}
env {
RETRIES = "3" // ✓
}

In the Book

See also

  • The grammar rule it governs: env_clause.
  • Every code in its category, Suites and cases, on the diagnostic index.
  • bynk explain bynk.suite.env_not_literal shows the same from the installed toolchain, without a network.