TypeScript 0.9 - Could not find file

Just upgraded to version v.9.9 and several files in my project cannot be compiled with

Error TS5004: Could not find file: 'myfile.ts'.

To fix the problem, I compiled its dependencies individually, trying to narrow down the problem, but they all compile fine. So, I returned to this file. The original compilation of Web Essentials does not show any errors. What could be the reason for this?

+3
source share
2 answers

This is almost certain, because the file is saved with ANSI encoding and contains a character other than ASCII (smart quotes of single or double sort are used here). The best solution is to save the file in UTF-8 encoding, although you can also just delete the ANSI characters to make the all-ASCII file again.

+9
source

Can you try to delete the file and recreate it? This may be the result of how the file was originally added to the project.

0
source

Source: https://habr.com/ru/post/1487015/


All Articles