由于某种原因,SublimeLinter3或SublimeLinter3 JSHint linter插件似乎无法解析PATH
环境变量,因此无法运行jshint
:
SublimeLinter: Could not parse shell PATH output:
<empty>
error: SublimeLinter could not determine your shell PATH. It is unlikely that any linters will work.
Please see the troubleshooting guide for info on how to debug PATH problems.
SublimeLinter: WARNING: jshint deactivated, cannot locate 'jshint'
Can't connect
Unable to fetch update url contents
jshint
二进制文件位于PATH
中,但是:$ which jshint
/home/path/to/bin/jshint
该问题仅在Ubuntu上发生。在OS X上可以完美运行。我已经遍历official docs了,但没有用。
如果有任何后果,请使用
bash
。
最佳答案
我最终通过打开SublimeLinter首选项并手动将路径添加到linter来解决此问题:
"paths": {
"linux": ["/path/to/jshint/bin"],
"osx": [],
"windows": []
},
如果还没有,可以通过
npm
安装:npm install -g jshint
您可以通过以下方式找到其位置:
which jshint
或在Windows中:
where jshint
关于sublimetext3 - Sublime Text 3 SublimeLinter插件无法找到jshint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20966593/