I want to install typescript, so I used the following command:
npm install -g typescript
and test tsc --version, but it just
If your TSC command is not found in MacOS after proper installation of TypeScript (using the following command: $ sudo npm install -g typescript, then ensure Node /bin path is added to the PATH variable in .bash_profile.
Open .bash_profile using terminal: $ open ~/.bash_profile;
Edit/Verify bash profile to include the following line (using your favorite text editor):
export PATH="$PATH:"/usr/local/lib/node_modules/node/bin"";
Load the latest bash profile using terminal: source ~/.bash_profile;
Lastly, try the command: $ tsc --version.