Reputation: 107
I've got myself into a bit of a problem. I left my computer at home and went to my summer home for a couple of days, when I return home and try to save files inside Sublime Text 2 I get this error:
module.js:340
throw err;
^
Error: Cannot find module '/usr/local/bin/jslint'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
[Finished in 0.1s with exit code 1]
Thankful for advice how to fix this :)
Upvotes: 3
Views: 2167
Reputation: 18280
You might also want to look into the JSLint (with node) for Sublime Text 2 plugin at https://github.com/darrenderidder/Sublime-JSLint as an easy and straightforward alternative.
Upvotes: 0
Reputation: 1
Symlink the executable:
ln -s /usr/local/share/npm/bin/jslint /usr/local/bin/jslint
If you didn't use npm install -g
, use which jslint
to locate it
Upvotes: 0
Reputation: 83676
You need to have Jslint4Java or Node.js and its jslint module installed on your computer in order to make the plug-in work. Both of these projects provide jslint command.
For specific instructions to install Jslint4Java see:
http://opensourcehacker.com/2012/04/12/jslint-integration-for-sublime-text-2/
For specific instructions to install Node.js + jslint see:
https://github.com/reid/node-jslint
Also I recommend jshint (in SublimeLinter package) over jslint:
https://github.com/SublimeLinter/SublimeLinter
Upvotes: 2