Skip to content
Latchkey

TS1005: ';' expected (or other token) - in CI

tsc hit a syntax error: a token it required (a semicolon, comma, paren, or bracket) is missing.

What this error means

Type-checking fails with TS1005 stating which token was expected at a specific position.

tsc
src/parse.ts(12,18): error TS1005: ',' expected.

Common causes

How to fix it

Fix the syntax at the reported position

  1. Go to the file/line/column and correct the missing or stray token

Use the right extension for JSX

  1. Rename files containing JSX to .tsx so the parser enables JSX
shell
mv src/Card.ts src/Card.tsx

How to prevent it

  • Run tsc --noEmit and a formatter in CI to catch syntax errors, and keep JSX in .tsx files.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →