Appearance
T5003: Script API not imported with auto-imports off
Cause
With autoImports: false, a script API such as state must be imported, and it is not.
Example
text
<contract>
{ "name": "Card", "role": "group", "parts": ["root"] }
</contract>
<script>
const n = state(0)
</script>
<template><div class="root">{n}</div></template>What you see
text
ERROR T5003 app/components/Card.tess:5:11
"state" is not defined. Auto-imports are off, so it must be imported.
Add: import { state } from "@pixelscriptio/tessera/core"
Run `tessera explain T5003` for details.Fix
Add the import the hint gives, or turn auto-imports back on.