Appearance
T5002: Auto-import used outside a .tess file
Cause
A plain .ts file calls an auto-imported name such as useRoute() or state() without importing it. Auto-imports only exist inside .tess files.
Example
ts
export const here = () => useRoute().pathWhat you see
text
ERROR T5002 app/utils/nav.ts:1:27
Unresolved identifier "useRoute" in app/utils/nav.ts. Auto-imports only apply inside .tess files; import it from "@pixelscriptio/tessera/router".
Run `tessera explain T5002` for details.Fix
Import it where the message says.
text
import { useRoute } from '@pixelscriptio/tessera/router'
export const here = () => useRoute().path