I am using Windows. I installed Node.js.
SublimeLinter: WARNING: jshint cannot locate 'jshint'
I'm getting this error. What should I do?
Try npm install jshint --global
.
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
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}
}
}}