Your PATH may be missing the directory that contains the executable.
I installed it locally,
$ npm install jshint
I would have to call it from the .bin
directory in the node_modules
directory, like this:
$ node_modules/.bin/jshint js_file_test.js
If you install it globally, with the -g
flag, then you will be able to run it from anywhere as long as the path to your npm modules in in your path. To check the path from the command line, run:
$ echo %PATH%
As an example, the path to my copy of the jshint executable (jshint.cmd) is located in C:\Users\Paul\AppData\Roaming\npm
. That directory is in my path so I can run jshint from anywhere.