Languages

TypeScript - error TS5014: Failed to parse file 'tsconfig.json/tsconfig.json': Unexpected token u in JSON at position 0.

6 points
Asked by:
JustMike
27880

Hi,

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? 

1 answer
1 points
Answered by:
JustMike
27880

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.

0 comments Add comment
Native Advertising
­čÜÇ
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé

Join