Skip to content
Latchkey

Nuxt "vue-tsc" type check failure in CI

Nuxt's type check runs vue-tsc over your components and composables. It reports real type errors that the bundler does not enforce, so a job with type checking enabled fails where nuxt build alone would pass.

What this error means

A nuxi typecheck or vue-tsc --noEmit step fails with "Found N errors" and TypeScript codes such as TS2339 or TS2322 pointing into .vue files or composables.

nuxt
app.vue:12:18 - error TS2339: Property 'title' does not exist on type '{}'.
Found 1 error in app.vue:12

Common causes

Real type errors not caught by the bundler

The runtime build does not type check, so genuine type mismatches only surface when vue-tsc runs in CI.

Stale generated types

The .nuxt types are out of date because nuxt prepare did not run before the check, so types do not match the code.

How to fix it

Prepare types then run the check

  1. Run nuxt prepare so .nuxt types are current.
  2. Run nuxi typecheck and read each TS error.
  3. Fix the type mismatches the check reports.
Terminal
npx nuxt prepare
npx nuxi typecheck

Type the data so the property exists

Give the value an explicit type so the property access is valid.

app.vue
const { data } = await useFetch<{ title: string }>('/api/page')

How to prevent it

  • Run nuxt prepare before vue-tsc so generated types are fresh.
  • Type useFetch/useAsyncData results explicitly.
  • Run the type check locally before pushing.

Frequently asked questions

What causes "vue-tsc type error"?
The runtime build does not type check, so genuine type mismatches only surface when vue-tsc runs in CI.
How do I fix vue-tsc type error?
Prepare types then run the check

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card