Today when I run
tsc for my project I got some error:
error TS5014: Failed to parse file 'tsconfig.json/tsconfig.json': Unexpected token u in JSON at position 0.
Yesterday when I was working,
tsc was wroking without any problems too.
I don't see any changes of
tsconfig.json in git history. Even, I don't have 'tsconfig.json/tsconfig.json' in any properties. I work on Ubuntu 20.04.
To check project source code corectness I use:
npx tsc --project ./tsconfig.json --noEmit
Any ideas what happened?
I had same problem when something happened with my tsc.
I have solved my problem with:
sudo npm -g install typescript
It have installed last version - now everything works well again.
Full article about
tsc upgrade is here.