Reference

Errors

Every error has a stable code and type. art check prints it for people; art check --ai prints one JSON line with expected, actual and fixes, ready to send back to a model.
sh
$ art check --ai
{"code":"E1011","type":"UNKNOWN_FIELD","loc":"app.art:13:10","at":"Users","expr":"u.emial","expected":"id|name|email","fixes":["email"]}
CodeTypeMeaning
E0001UNEXPECTED_CHARInvalid character in the source.
E0002UNTERMINATED_STRINGUnterminated string.
E0003UNEXPECTED_TOKENUnexpected token; something else was expected.
E1001UNDEFINED_NAMEName not defined in this scope.
E1002DUPLICATE_NAMEName declared twice.
E1003UNKNOWN_TYPEUnknown type.
E1010TYPE_MISMATCHThe value's type doesn't match the expected one.
E1011UNKNOWN_FIELDThe model has no such field.
E1012MISSING_FIELDA required model field is missing.
E1023POSSIBLY_EMPTYThe value may be null; that case must be handled.
E1024NOT_A_LIST`for` needs a list.
E1030ASSIGN_READONLYOnly `state` and `let` variables can be assigned.
E1040AUTH_REQUIRED`login` and `private` need an `auth` declaration.
E1050UNKNOWN_MODULEThe module of a `use` can't be found (not installed, or a wrong path).
E1051UNKNOWN_EXPORTThe module doesn't export that name.
E1060TEXT_BRACES`{name}` inside a plain string isn't interpolated; use a template `${name}`.
E2001UNKNOWN_ELEMENTUnknown UI element or component.
E2002UNKNOWN_PROPInvalid prop for this element or component.
E2003MISSING_PROPA required prop is missing (component props, or `options` of select/radio/tabs).
E2004NO_ACTIONThis element doesn't take an `->` action.
E2005STATEMENT_IN_VIEWA statement where an element goes; statements belong in an action, a fn, `mount` or `effect`.
E2005NO_CONTENTThis element doesn't take content.
E2006NOT_BINDABLE`input`, `select`, `checkbox`, `modal`, etc. need a `state` (or a field of one) to bind to.
E2007NO_CHILDRENThis element doesn't take `{ }` children.
E2008LAYOUT_SLOTA layout needs exactly one `slot`, and `slot` only goes in layouts.
E2009BAD_ROUTEInvalid or repeated page route.
E2010BAD_CLEANUP`cleanup { }` only goes inside `mount { }` or `effect { }`.
E2011LAYOUT_CYCLEA layout ends up inside itself through `layout` (Docs inside Site inside Docs).
E3001PATCH_SYNTAXInvalid patch line: an operation was expected.
E3002TARGET_NOT_FOUNDThe patch path doesn't exist.
E3003AMBIGUOUS_TARGETThe path matches several nodes: add an index `[n]`.
E3004PATCH_BODYThe patch body isn't valid for that target.