由于某种原因,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上可以完美运行。我仔细查看了官方文档,但没有用。
使用bash
是否有任何后果。
我最终通过打开SublimeLinter首选项并手动将路径添加到linter来解决此问题:
"paths": {
"linux": ["/path/to/jshint/bin"],
"osx": [],
"windows": []
},
如果尚未安装,则可以通过npm
以下方式安装:
npm install -g jshint
您可以通过以下方式找到其位置:
which jshint
或在Windows中:
where jshint
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句