---
title: MARKLESS_ROSTER_COUNT_NOT_A_NUMBER
description: "roster count is spent as a number before the page can answer it: a Markless compiler error."
sidebar: { hidden: true }
search: { keywords: ["ROSTER_COUNT_NOT_A_NUMBER","roster count not a number","markless error"] }
pagination: false
---

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

## What happened

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

```text
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.

## How to fix it

Start with the suggestion in the message above.

This page has no guide yet. [Help write it](/contributing/improve-these-docs).

## Where it comes from

`@markless/compiler` raises this code. Source:

- [packages/compiler/src/passes/semantic-graph/diagnostics.ts](https://github.com/compiled-run/markless/blob/main/packages/compiler/src/passes/semantic-graph/diagnostics.ts)

Read [how to read a Markless error](/tooling/diagnostics), or go back to [all error codes](/errors).
