Sublime Text 3 SublimeLinter plugin not able to find jshint

六眼飞鱼酱① 提交于 2019-12-04 01:56:20
jdlm

I eventually fixed this by opening up the SublimeLinter preferences and manually adding the path to the linter:

"paths": {
    "linux": ["/path/to/jshint/bin"],
    "osx": [],
    "windows": []
},

If you don't already have it, you can install via npm:

npm install -g jshint

And you find its location with:

which jshint

or in Windows:

where jshint

This fix is specific to windows, you could edit your preferences like jorum. OR you can add it to your windows "Path" which may be more helpful in the future.

Start > Control Panel > System > Advanced System Settings > Environment Variables...

Select your PATH and click edit.

ADD this to the end of the Variable Value: ;C:\Users\YOURUSERNAMEHERE\node_modules\jshint\bin

TO TEST: Open a command prompt and type jshint -v and you should get a version number and not an error.

What you just did was added told your OS where it can find jshint, your install location may be different, in that case just search for a jshint folder on your system that has a /bin folder inside it and link there instead. NOTE the semi-colon(;) at the beginning separates different PATH's so be sure its included.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!