Error codesLists

Roster count is spent as a number before the page can answer it

MARKLESS_ROSTER_COUNT_NOT_A_NUMBERerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_ROSTER_COUNT_NOT_A_NUMBER: Cannot spend the roster count "<computedName>" in <operation> ("<source>") in <componentName>: at server render the count is a placeholder the renderer resolves once the page has composed, so only a bare read printed as text or as an attribute value carries it.<arrivedAs>
A count is how many parts END UP in the family instance, and a single forward render pass cannot know that when the asker renders. The render writes a placeholder and the served page answers every one it wrote, which a printed value carries and an operation destroys - the comparison or the arithmetic runs against the placeholder string and paints a wrong value silently.
Print <computedName> on its own - {<computedName>}, an attribute value, or a ${<computedName>} slot in a template literal - and do the arithmetic in an event handler or in CSS, where the count is a number.
https://markless.dev/errors/MARKLESS_ROSTER_COUNT_NOT_A_NUMBER

Words in angle brackets change from case to case.

Why

A count is how many parts END UP in the family instance, and a single forward render pass cannot know that when the asker renders. The render writes a placeholder and the served page answers every one it wrote, which a printed value carries and an operation destroys - the comparison or the arithmetic runs against the placeholder string and paints a wrong value silently.

Fix

Print <computedName> on its own - {<computedName>}, an attribute value, or a ${<computedName>} slot in a template literal - and do the arithmetic in an event handler or in CSS, where the count is a number.

Where Markless raises it

All error codes