Skip to main content

Module codes

Module codes 

Source
Expand description

Stable, machine-readable diagnostic codes.

Each constant is a permanent identifier for one class of authoring mistake. The code is rendered alongside every diagnostic and emitted as a structured field by webui build --format json, so editors, CI, and AI assistants can map an error to a deterministic fix or docs page regardless of the human-readable wording. Treat these as a stable API surface — rename only with a deliberate, documented migration.

Constants§

AMBIGUOUS_MODULE_ENTRY
More than one build output shares the file name of an authored <script type="module" src>, so its shared chunks cannot be preloaded without guessing which output the URL serves. Severity: warning.
AUTHORED_WEBUI_HYDRATE
<webui-hydrate> was written by an application author. It is reserved for the compiler/handler-generated runtime hydration sentinel.
BOUNDARY_CROSSES_SCOPE
A <boundary> would cut through component host content, a reusable component template, an inert/raw-text HTML element, <if>, <for>, or <route> instead of independently wrapping it.
BOUNDARY_IN_FOSTER_CONTEXT
A <boundary> appears inside an HTML insertion mode that foster-parents unknown elements (<table>, <tbody>, <tr>, <select>, …), which would separate the generated <webui-hydrate> sentinel from its payload script.
BOUNDARY_OUTSIDE_BODY
A <boundary> appears before <body> opens or after it closes.
COMPONENT_ASSETS_WITH_ROUTES
Static component assets were requested for a graph containing <route>.
DUPLICATE_BOUNDARY_NAME
Two <boundary> directives in the same entry template share a name.
EXCESSIVE_MODULE_PRELOADS
A module entry’s static import closure exceeded the modulepreload hint cap. Preloads share one connection, so the remainder would delay the entry they are meant to accelerate. Severity: warning.
EXCESSIVE_NESTING
Template nesting exceeds the parser’s depth limit.
INVALID_BOUNDARY_NAME
<boundary name> is not a static string literal (e.g. it contains a {{binding}}).
INVALID_COMPONENT_RENDER_POLICY
A component’s root rendering or hydration policy is malformed.
INVALID_CSS
A <style> block contains malformed CSS.
INVALID_EVENT_HANDLER
An @event handler value is not a valid {handler()} expression.
INVALID_FOR_EACH
<for each> value is not of the form item in collection.
INVALID_FOR_IDENTIFIER
<for each> item or collection name uses disallowed characters.
INVALID_FOR_KEY
An explicit repeat key is malformed or used on an invalid element.
INVALID_IF_CONDITION
<if condition> value is not a parseable expression.
INVALID_RENDER_RESERVATION
A lazy-render intrinsic block-size estimate is malformed or misplaced.
INVALID_W_REF
A w-ref binding is missing its required {braces}.
MALFORMED_HTML_TAG
An HTML tag could not be parsed (missing >, stray <, …).
MISSING_BOUNDARY_NAME
<boundary> is missing its required, non-empty name attribute.
MISSING_FOR_EACH
<for> element is missing its required each attribute.
MISSING_IF_CONDITION
<if> element is missing its required condition attribute.
MISSING_RENDER_RESERVATION
Lazy rendering omitted the intrinsic block-size estimate needed to reserve scroll geometry while the browser skips layout.
MISSING_THEME_TOKEN
A CSS token required by parser output is missing from the configured theme.
NESTED_BOUNDARY
A <boundary> is nested inside another <boundary>.
RECURSIVE_TEMPLATE
A template references itself (directly or transitively) at build time.
SCRIPTLESS_EVENT_HANDLER
A scriptless HTML component contains event bindings and needs authored JS.
STREAMING_WITHOUT_PROJECTION
An entry declares <boundary> streaming checkpoints but the build has no state-projection manifest, so every checkpoint serializes the whole state object instead of its own components’ keys. Severity: warning.
UNCLOSED_HTML_TAG
An HTML element is missing its closing tag.
UNEXPECTED_CLOSING_TAG
A closing tag has no matching opening tag.
UNKNOWN_COMPONENT
A component tag has no matching registered component.
UNSAFE_MODULE_PRELOAD
A resolved modulepreload href contains characters that cannot be written verbatim into an HTML attribute, so the hint was dropped rather than emitted or escaped. Severity: warning.
UNTERMINATED_HTML_COMMENT
An HTML comment was opened but never closed with -->.
UNTERMINATED_HTML_DECLARATION
An HTML declaration was opened but never closed with >.
UNTHEMED_TOKEN
A CSS token used only with a literal var() fallback and absent from every theme — non-fatal, but usually a typo. Severity: warning.