73rhodes / Sublime-JSLint

JSLint for Sublime Text 2 and 3.
80 stars 14 forks source link

Doesn't work on ST3 (linter.js cannot be found) [OSX] #31

Closed ellmo closed 10 years ago

ellmo commented 10 years ago

I simply can't get it to work. The console error (without any special User settings) is:

[Errno 2] No such file or directory: 'node'
[cmd: ['node', '~/Library/Application Support/Sublime Text 3/Packages/JSLint/linter.js' (...)

...though node is in my PATH. So I figured ST3 doesn't use my PATH and I added this to User settings:

{
   "jslint": ["/usr/local/bin/node", "~/Library/Application Support/Sublime Text 3/Packages/JSLint/linter.js"]
}

And now I get

module.js:340
    throw err;
          ^
Error: Cannot find module '~/Library/Application Support/Sublime Text 3/Packages/JSLint/linter.js'

which is not surpising, seeing as linter.js is nowhere to be found, it's probably inside JSLint.sublime-package, but node cannot open it and run the file now, can it?

darrenderidder commented 10 years ago

Operating System and version?

ellmo commented 10 years ago

OSX 10.9.3

darrenderidder commented 10 years ago

In terminal, run: find ~/ -name linter.js

ellmo commented 10 years ago

There's really nothing, I can't find it. Also searched in /Library/

darrenderidder commented 10 years ago

Reproduced. Investigating...

darrenderidder commented 10 years ago

Thanks for submitting the issue, it should be fixed now. Please choose Tools > Command Palette > Package Control > Upgrade Package and choose JSLint. You might still need to modify the location of the node command, although on Mavericks the default should work. Let me know if that fixes if for you.

ellmo commented 10 years ago

It works like a charm now. Didn't even have to specify User settings.

darrenderidder commented 10 years ago

oh, good. it turns out ST3 has a different package format - zipped. some packages need to set a flag not to do that.