Skip to content
These are temporary community docs. The official docs are in progress.Help improve them
Markless
Esc
↑↓navigate↵open⌘Jpreview
On this page

MARKLESS_ELEMENT_HANDLE_DUPLICATE

element() handle is bound more than once: a Markless compiler error.

Error from the compiler, while it builds your .tsrx files.

What happened

Markless prints the message, the reason, and a suggestion:

MARKLESS_ELEMENT_HANDLE_DUPLICATE: Cannot bind element handle "<handleName>" inside a keyed repeat because one authored handle would point at many row host elements. markless debugging playbook: run pnpm doctor, or read agent/markless.md in the installed @markless/core package
Each repeated row has its own DOM locator, so one handle declared as a single element cannot say which row it means.
Declare the handle as an ordered set by widening its type argument to an array - element<HTMLElement[]>() - written literally as T[], Array<T> or readonly T[]. Reads then answer every bound element in document order. Otherwise create a separate element() handle for each host element.
https://markless.dev/errors/MARKLESS_ELEMENT_HANDLE_DUPLICATE

Words in angle brackets change from case to case.

How to fix it

Start with the suggestion in the message above.

This page has no guide yet. Help write it.

Where it comes from

@markless/compiler raises this code. Source:

Read how to read a Markless error, or go back to all error codes.

Was this page helpful?