LuxelEspañol

Luxel v0.1 · Reference · part 4 of 5

Luxel compiler diagnostics (4)

CodeRuleSeverityWhenWhat to write instead
LUXEL-E047options-over-limiterrorAn options() list allows more options than the maxOptions policyLower max, or search on the server
LUXEL-E048page-size-over-limiterrorA collection shows more items per page than the pageSize policyPaginate on the server with a smaller page; or, for a short fixed list, exempt it in the contract: collection({ …, page: false, maxItems: 12 }) (maxItems still bounds it)
LUXEL-E049missing-translationerrorA fixed text of a view has no entry in the catalog of a declared languageAdd the key to i18n/‹lang>.json
LUXEL-E050layout-too-deeperrorThe layout nests more elements than render.dom@1 allows (16; Sprint 9, ADR-044)Flatten wrappers that only carry a class, or move a part into a helper with fewer levels
LUXEL-E051static-viewerrorSprint 10 (ADR-046): views.‹id>.static without public: true, with whenAuthenticated, or an identity that names no input of the view's events{ public: true, static: true, identity: "‹the Field name>" }; a page with anyone's data is never static
LUXEL-E052data-fetching-in-viewerrorSprint 10: fetch, XMLHttpRequest, WebSocket or EventSource used while a view runs (it would call the network during the build)Declare the data in the contract, read it in defineLoad, show it with bind; later changes through ‹Action event> and defineEvent
LUXEL-E053browser-api-in-viewerrorSprint 10: window, document, localStorage, sessionStorage, navigator, location, history, indexedDB or alert used while a view runs (views run in Node at build time; none of their code reaches the browser)Data and preferences on the server (defineLoad), navigation with ctx.navigate(), presentation in CSS
LUXEL-E054env-in-viewerrorSprint 10: process.env read while a view runs (its value would be written into a public template). Sprint 12.3: also at the top of a view file, and anywhere in luxel.config.ts or the contract (titles, messages, the route table and link addresses are public too)Read configuration and secrets on the server (handlers, bindings)
LUXEL-E058load-without-policyerrorSprint 12 (SEC-S12): a view of the contract has no valid load policy (who may run its defineLoad; deny by default), or it contradicts the route: publicLoad() on a view that is not public, or roles on a public viewWrite load: allow(["role"]), or load: publicLoad() next to views.‹id>.public: true
LUXEL-E059link-targeterrorSprint 12.1 (ADR-058): a ‹Link to> names no view or page of luxel.config, or one not served in every variant the linking view is served in (the address is relative, so it keeps the variant)Link to a route of this app; another site is shown as text
LUXEL-E060server-code-at-builderrorSprint 12.3 (ADR-061): a screen file used something imported from a server-only module outside a handler (a top-level call, a value placed in the view). The build never loads server modules; the import is an inert stand-in. Move the statement into the handler or into the server module.
LUXEL-E061string-where-accessorerrorSprint 12.3 (ADR-061): in a screen, state, events and inputs are named with accessors (bind={state.summary}, event={events.add}, ‹Field for={events.add.inputs.name}>), not strings, and an input's bounds are declared with its event.
LUXEL-E062input-without-fielderrorSprint 12.3 (ADR-061): an event declares an input that no field of the view fills.
CodeRuleSeverityWhenWhat to write instead
LUXEL-E063screens-need-permission-modelerrorSprint 12.3 (ADR-061): screen files are evaluated in a separate Node process started with Node's permission model and nothing allowed; this Node has neither --permission nor --experimental-permission, and the build does not evaluate a screen in its own processBuild with a Node that has the permission model (every version Luxel supports has it)
LUXEL-E064route-patherrorSprint 12.3 (C5): a declared path is not a static route: it has a parameter segment (:id, *, [id]; route parameters are not available yet), it is outside the grammar (lowercase segments of letters, digits and dashes, starting with "/", no trailing slash), it is reserved (/_luxel, /healthz, a variant's prefix), or its view is served in more or fewer than one variantWrite a path such as "/", "/pricing" or "/docs/getting-started"; with several variants, variants: ["dom"] next to it
LUXEL-E065route-collisionerrorSprint 12.3 (C5): two views or pages declare the same path, or one declares twoGive each view its own path, or remove one to keep that view's id address /‹variant>/‹view id>
Edit this page on GitHub

This page: 7.9 KB of JavaScript (Luxel's shared runtime), 0 KB from your app.

Measured when the site is built: the runtime files this page loads, compressed as they are sent.

Made by IntiOps. Luxel 0.1.0-beta.1 is a beta: no external security review yet.