TypeScript: error TS1005: ';' expected.
The parser hit a syntax error — missing punctuation, mismatched brackets, or an unsupported syntax for your TypeScript version.
error TS1005: ';' expected.error TS1005: ',' expected.error TS1005: '}' expected.error TS1005: ')' expected.TS1005 expected Meaning
Look at the reported line and the line before it: missing comma/semicolon/brace, unclosed template string or JSX tag, => in the wrong spot, or newer syntax (satisfies, accessor, decorators) on an older TypeScript. Update TypeScript (npx tsc -v) and your editor's TS version.
Common causes
- Missing/extra bracket, comma or semicolon
- Unclosed string/template/JSX
- Newer syntax with an old compiler (
satisfies,enum const) - Pasted smart quotes
- Wrong file type (JSX in .ts)
⚡ Quick fix
- Fix the syntax at/above the line
- Upgrade TypeScript (
npm i -D typescript@latest) - Use
.tsxfor JSX; replace smart quotes
Detailed fix by platform
Linux
npx tsc -v && npx tsc --noEmit | head
How to diagnose
- Line — Previous line OK?
- TS version — Supports syntax?
- File — .tsx for JSX?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in TypeScript
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026