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
- Go to the file/line/column and correct the missing or stray token
Use the right extension for JSX
- Rename files containing JSX to .tsx so the parser enables JSX
shell
mv src/Card.ts src/Card.tsxHow to prevent it
- Run tsc --noEmit and a formatter in CI to catch syntax errors, and keep JSX in .tsx files.
Related guides
TS1109: Expression expected - in CIFix "error TS1005/TS1109: Expression expected" when tsc runs in CI - a parser error from malformed syntax or…
TS1128: Declaration or statement expected - in CIFix "error TS1128: Declaration or statement expected" when tsc runs in CI - a stray token, an extra brace, or…