Welcome, I can't run Typescript all my day. I use Visual Studio Code. What I am doing is installing TS globally:
$ npm install -g typescript
Then when I check it:
$ tsc
I get that error in all cases:
bash: tsc: command not found
To that time I have tried following solutions:
- Setting npm config:
$ npm config set prefix /usr/local
What I get after npm root -g
is:
C:\Program Files\Git\usr\local\node_modules
Setting npm config by relative way to get (And I get it):
C:\usr\local\node_modules
Setting .bash_profile:
export PATH=/usr/local/share/npm/bin:$PATH
Setting .bashrc with PATH also...
Installing Typecript as dev dependency also don't work.
Other small solutions that I even don't remember.
Please for help. I can provide more information that you need - just say what.
Will definitely work:
PATH
for you)npm install typescript -g