bash:tslint:找不到命令

Edg*_*rka 7 javascript typescript tslint

我试过用tslint --fix但得到了bash: tslint: command not found....

我使用命令安装了tslint : yarn global add tslint typescript.

我的机器使用Centos 7.

小智 16

我最近遇到了同样的问题.Yarn输出说它添加了"tslint"二进制,但它在撒谎.要实际安装它,您需要以Yarnroot 身份运行,因此:

sudo yarn global add tslint typescript
Run Code Online (Sandbox Code Playgroud)