# CI typecheck fails (or passes with a broken href) because .expo/types is missing

> Typed routes are generated into .expo/types/router.d.ts by the dev server, and .expo is gitignored.

Web page: https://davidewins.com/errors/expo-typed-routes-ci-false-errors

Expo. Confirmed fix, 23 September 2026.

Versions: expo-router typedRoutes, SDK 57

Error:

```
error TS2578: Unused '@ts-expect-error' directive
```

## Cause

Typed routes are generated into .expo/types/router.d.ts by the dev server, and .expo is gitignored. A fresh checkout typechecks against looser default types: it can invent errors, and it can also pass with a typo in an href.

## Fix

There is no `expo typegen` command. In CI, start the dev server briefly so it writes the file, then typecheck:
```bash
(npx expo start --offline > /dev/null 2>&1 &) ; sleep 15 ; npx tsc --noEmit
```
Locally the file also goes stale silently; regenerate it if local and CI disagree.

## More Expo errors

- [Dev client red screen: No script URL provided (launcher never appears)](https://davidewins.com/errors/expo-dev-client-no-script-url-precompiled)
- [Bundle fails with Invalid expression encountered after supabase-js update](https://davidewins.com/errors/supabase-js-hermes-invalid-expression)
- [After upgrading to SDK 57, expo-font / expo-image / expo-asset config is missing](https://davidewins.com/errors/expo-sdk57-plugins-must-be-declared)
- [SDK upgrade: export dies with SyntaxError after expo install --fix](https://davidewins.com/errors/expo-install-fix-leaves-babel-preset-stale)
- [expo-doctor wants TypeScript 6 but tsc reports hundreds of errors](https://davidewins.com/errors/typescript-6-explodes-typecheck-expo)

[Search all errors](https://davidewins.com/errors)
