2

I am using Windows. I installed Node.js.

SublimeLinter: WARNING: jshint cannot locate 'jshint'

I'm getting this error. What should I do?

2 Answers 2

3

Try npm install jshint --global.

1
  • Try npm cache clean, followed by sudo npm install -g npm, then retry the npm install jshint --global from your home directory. Apr 9, 2018 at 5:20
0

This works for linux as well.

Do the following:

1- npm install jshint --global

If you still cant use it follow next steps:

2- In the User file you have to add jshint and node path now. You can find the these paths from your terminal using whereis node and whereis jshint .

3- Go to Preferences > Package settings > sublimeLinter > settings Now add the paths in the user file

{"paths":{
    "windows":[YOUR WINDOWS JSHINT PATH],
    "linux":[YOUR LINUX JSHINT PATH]
},
"linters":{
    "jshint":{
        "env":{"PATH":YOUR NODE PATH}
    }
}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.