TypeScript TS6053: File '.ts' not found

I get this error

error TS6053: File 'xxx.ts' not found.

but the files are compiled yesterday, but not today, after checking, I did this simple test

class HelloWorld { public static main(): number{ return 0; } } HelloWorld.main(); 

but I get the same error, does anyone know the reason for this, or maybe an error

error TS6053: File 'HelloWorld.ts' not found.

https://github.com/Microsoft/TypeScript/blob/v1.6.2/src/compiler/diagnosticMessages.json#L2205


UPDATE:

Closing ide and opening an error does not mean that everything was the same.

Opened ide,

file > folder close

file > open folder > your folder

fix this error.

+11
source share
4 answers

I got this error "TS6053" because Visual Studio 2017 did not find the folder that I added to the Angularjs project.

The solution posted by Angel Angel above to restart the IDE (or Visual Studio) in my case) solved the problem.

Hope this answer can help someone looking for bugs and visual studio. I will also include a full error message to catch requests for the same error.

 Severity Code Description Project File Line Suppression State Error TS6053 File 'C:/Users/.../my_project/node_modules/xlsx/types' not found. my_project JavaScript Content Files 1 Active 

Closing and opening Visual Studio fixed my problem. Thanks Angel Angel

+1
source

I had a similar problem, a bunch of files gave TS6053: File '.cs' not found

Checking the project and canceling all changes in the project solved the problem for me

0
source

The main reason for this error is the launch of the TypeScript file compilation command in the wrong directory.

Replace I have app.kironTest.ts file app.kironTest.ts folder src so I have to write the following command to run the file app.kironTest.ts as my file name app.kironTest.ts . in the src directory.

 tsc .\app\app.kironTest.ts 

Successfully complete the command.

But if you command as shown below:

 app.kironTest.ts 

You will get the following error

enter image description here

The correct command would be:

 tsc .\app\app.kironTest.ts 
0
source

I fixed this problem by restarting the VS code and deleting the temporary files.

To delete a temporary file:

 Click start > Run > Type > %temp% > Enter 
0
source

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


All Articles