The following is the set path. The path starts with a ~ symbol, but I am using win10. How should I modify this path so that it can also be used on win systems?
let jshint2_command = '~/path/to/node_modules/.bin/jshint'
The following is a screenshot of the error message
Is this really the real path of jshint? I don’t know much about it, but if the path is not wrong, try it
expand('~/path/to/node_modules/.bin/jshint')
This is the path where JSHint cannot be found.
~/path/to/node_modules
翻译过来就是~/路径/到/node_modules
,意思是你要自己把这个路径修改成正确的路径。。。先找到你
npm -g install
The installation path.This command to see if you have modified npm’s prefix configuration:
If there is no output in this step, then you probably have not modified the configuration and are using the default path. You can see the default path with this command:
prefix = "xxxxx"
这个 xxxxx 就是安装路径了。印象中默认是AppDataRoamingnpm
,你自己检查确认下。在里面如果有 jshint 文件夹,你就把AppDataRoamingnpmjshint.binjshint
这个路径在 vimrc 中赋给jshint_command
.If you have npm folder but not jshint, then first
npm i -g jshint
By the way,
~
是 linux 和 unix 系统默认的 User(用户)文件夹,相当于 Windows 的Users/User/你的名字