14

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.

Edgaras Karka
  • 7,400
  • 15
  • 61
  • 115

2 Answers2

29

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
S. Matsepura
  • 1,673
  • 1
  • 17
  • 24
pevel
  • 404
  • 4
  • 6
4

I needed to delete the /node_modules folder and run npm install and it was fixed again

dang
  • 1,549
  • 1
  • 20
  • 25