Skip to content

T3004: Contract name does not match the file name ​

Cause ​

The contract name must equal the file name, so a component is found by one name everywhere.

Example ​

xml
<contract>
{ "name": "Other", "role": "group", "parts": ["root"] }
</contract>
<template><div class="root"></div></template>

What you see ​

text
ERROR  T3004  app/components/Card.tess:2:11
  Contract name "Other" does not match the file name "Card.tess".
  Rename the contract to "Card" or rename the file.
  Run `tessera explain T3004` for details.

Fix ​

Rename the contract or the file.

All errors and warnings