Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 10 tsc error TS5007: Cannot resolve referenced file: tsconfig.json

After moving to fresh windows 10 PC i have stuck with error.

TS5007: Cannot resolve referenced file: tsconfig.json

tsc stop working with tsconfig.json, i can not force it to find tsconfig.json, i call it with --p/--project flag and specify full path - nothing helped.

Where is a problem? And how it can be solved?

like image 952
user1338054 Avatar asked Sep 10 '15 09:09

user1338054


2 Answers

C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.js

for some reason the typescript was installed separately (not via npm) there, and that exe file replaced new one from npm.

i removed that folder ("C:\Program Files (x86)\Microsoft SDKs\TypeScript") and problem was fixed.

like image 98
user1338054 Avatar answered Sep 30 '22 03:09

user1338054


I have the same problem, and found that I have two typescript versions (1.0 and 1.8) in C:\Program Files (x86)\Microsoft SDKs\TypeScript

After removing the old version, it continued working properly.

like image 39
Ilija Ristevski Avatar answered Sep 26 '22 03:09

Ilija Ristevski