bash: tslint: command not found

Edgaras Karka picture Edgaras Karka · Dec 11, 2017 · Viewed 13.4k times · Source

I tried use tslint --fix but get bash: tslint: command not found....

I installed tslint using command: yarn global add tslint typescript.

My machine use Centos 7.

Answer

pevel picture pevel · Dec 22, 2017

I've run into the same problem recently. Yarn output says it added "tslint" binary, but it's lying. To actually install it you need to run Yarn as root, so:

sudo yarn global add tslint typescript