Duolith docs

Errors while checking a page

E0180 Behaviour the build cannot compile

Message name is a behaviour written in a form the build cannot compile

Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.

Why

A behaviour is a function declaration, function calendar(input: { ... }) { ... }, exported by name: the build finds its state by that shape, compiles its body so each caller gets its own state, and checks its one input (decision 0152). So it refuses a function that makes state written as an arrow or function expression (export const calendar = (input) => { ... }); an async or generator behaviour, which would make its state after the caller has gone on; a behaviour with more than one parameter; a default export in a behaviour file; and state, derived or effect imported under another name (import { state as s }), which the build would not know as state.

How to fix it

Write export function calendar(input: { start: string }) { ... } with one input object, run waiting inside an effect or state.load, export each behaviour by name, and import state, derived and effect under their own names.

In a terminal

duolith explain E0180

Mentioned in