I'm getting this error
error TS6053: File 'xxx.ts' not found.
but the files compiles fine yesterday, but today no, after reviewing, I made this simple test
class HelloWorld {
public static main(): number{
return 0;
}
}
HelloWorld.main();
but I get the same error, anyone know the reason for this or may be the error
error TS6053: File 'HelloWorld.ts' not found.
https://github.com/Microsoft/TypeScript/blob/v1.6.2/src/compiler/diagnosticMessages.json#L2205
UPDATE:
Closing the ide, and open the error does not solve everything was the same.
Opened the ide,
file > folder close
file > open folder > your folder
this fix the error.
I got this "TS6053" error because Visual Studio 2017 didn't find a folder I added to a Angularjs project.
The solution posted above by Angel Angel to restart the IDE (or Visual Studio) in my case) fixed the issue.
Hopefully this answer can help someone who's googling for the error and visual studio. I'll also include the entire error message to catch searches 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 issue. Thanks to Angel Angel
The main reason of this error is to running TypeScript file
compile command in a wrong directory.
Superpose I have crated a app.kironTest.ts
file under src
folder so I should write following command to run my app.kironTest.ts
file as my file name is app.kironTest.ts
. under src
directory.
tsc .\app\app.kironTest.ts
Above command run successfully.
But If you command like below:
app.kironTest.ts
You would get following error
Correct Command would be:
tsc .\app\app.kironTest.ts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With