I installed jshint-mode following the instructions on the front page and using npm. Whenever jshint-mode runs I see the following on the jshint-mode buffer and do not receive any expected errors.
throw e; // process.nextTick error, or 'error' event on first tick
TypeError: Cannot call method 'indexOf' of undefined
at getOpt (/usr/local/lib/node_modules/jshint-mode/jshint-mode.js:22:28)
at Object.<anonymous> (/usr/local/lib/node_modules/jshint-mode/jshint-mode.js:51:12)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
Process jshint-mode-server exited abnormally with code 1
I had the same problem on Mac OSX 10.6, running Emacs 23.3.1 and node v0.6.5. I managed to hack my way around it by editing the jshint-mode.js file. I simply replaced 'ARGV' with 'argv' in lines 22 and 23.
It's probably not the proper way to fix this, but it worked for me…
Feb 2015 , still same error I'm using debian
anyone managed to find a solution instead of manually editing the file ?
I guess this is because of the npm package is not updated, better install it directly through the git repo here which is updated,
flycheck which is supposedly a better version of flymake, now has built in support for jshint directly.