2
votes

Hello I just installed typescript and when i try to initialize tsc -v it gives me bash: tsc: command not found error.

When i was installing typescript with npm install -g typescript@latest it was installed with version 2.8.3.

My path is
/Users/ventzy/node-global/lib
├── [email protected]
└── [email protected]

As listed i can see it is installed but i can't call it in Visual Studio neither in terminal.

I am using MacOS 10.13.4 High Sierra.

So my question is how to fix this issue.

1
Have you tried to install it additionally locally by omitting the '-g' parameter? - Lynx 242
In order to execute a version installed locally: ./node_modules/.bin/tsc -v - Paleo
DiabolicWords yes but that didn't help. - Ventzeslav
@Paleo When i try this it still gives me tsc:command not found. But in ./node_modules/.bin there is the tsc file. - Ventzeslav

1 Answers

0
votes

I Am using ‘npm ci’ to installment typescript which is part of devdependencies im my package.json Faded some issue. I have to add typescript to dependencies section also to make it work