[英]SublimeLinter: WARNING: jshint cannot locate 'jshint'
I am using Windows.我正在使用 Windows。 I installed Node.js.
我安装了 Node.js。
SublimeLinter: WARNING: jshint cannot locate 'jshint'
SublimeLinter:警告:jshint 找不到“jshint”
I'm getting this error.我收到这个错误。 What should I do?
我该怎么办?
尝试npm install jshint --global
。
This works for linux as well.这也适用于 linux。
Do the following:执行以下操作:
1- npm install jshint --global 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. 2- 在用户文件中,您现在必须添加 jshint 和节点路径。 You can find the these paths from your terminal using
whereis node
and whereis jshint
.您可以使用
whereis node
和whereis jshint
从终端找到这些路径。
3- Go to Preferences > Package settings > sublimeLinter > settings Now add the paths in the user file 3-转到首选项>包设置> sublimeLinter>设置现在在用户文件中添加路径
{"paths":{
"windows":[YOUR WINDOWS JSHINT PATH],
"linux":[YOUR LINUX JSHINT PATH]
},
"linters":{
"jshint":{
"env":{"PATH":YOUR NODE PATH}
}
}}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.