How can I solve the issue of tsc Command not found?
I am currently working on a project which is based on TypeScript. When I was trying to compile my files of TypeScript, I encountered a scenario in which an error message occurred which was showing “ tsc command not found”. How can I troubleshoot this particular issue?
Here are the steps given to solve the issue of “tsc Command not found” during the compilation of files of TypeScript:-
Check environment variables
Firstly, check your TypeScript is installed and if it is installed properly check your environment of the system to ensure that the path of Typescript is executable or not in the PATH variable of the system.
Compile typescript files
Now you can compile your typescript files by running the following command:-
“tsc your_ files.ts”
You can replace “your_file.ts” with the actual file name that you wanted to get compiled.
Always ensure that the path of the installation of TypeScript and environment variables are ready to access the compiler of the TypeScript. If you are still encountering the issue of permission then try the elevated permissions or administrative access for installing the TypeScript globally.