Error codesState

Element() cannot be created at module scope

MARKLESS_ELEMENT_MODULE_SCOPEerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_ELEMENT_MODULE_SCOPE: Cannot create element handle "<name>" at module scope.
Element handles are per-render DOM locators. A module-scope handle would be shared across requests and cannot point at one document-owned host element.
Move element() creation into the component that owns the host element and bind it with el={handle}.
https://markless.dev/errors/MARKLESS_ELEMENT_MODULE_SCOPE

Words in angle brackets change from case to case.

Why

Element handles are per-render DOM locators. A module-scope handle would be shared across requests and cannot point at one document-owned host element.

Fix

Move element() creation into the component that owns the host element and bind it with el={handle}.

Where Markless raises it

All error codes