Skip to content

T4013: Contract not allowed or required here ​

Cause ​

Components need a <contract>, while pages and layouts must not have one, and only pages may have a <page> block.

Example ​

xml
<template><div class="root"></div></template>

What you see ​

text
ERROR  T4013  app/components/Card.tess:1:1
  This component has no <contract>. Every component needs one, for example <contract>{ "name": "Card", "role": "group", "parts": ["root"] }</contract>.
  Run `tessera explain T4013` for details.

Fix ​

Add a contract to the component, or remove the block that does not belong.

All errors and warnings