ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

installing using package control generates and error (sublime2/win7) #14

Closed Pomax closed 11 years ago

Pomax commented 11 years ago

Installing this with Sublime's package control "install package" by selecting "tern_for_sublime" generates the error "it appears Tern has not been installed, would you like tern_for_sublime to try and install it?". Letting it do so generates the error "installation failed, try doing npm install manually in C:...\Sublime Text 2\packages\tern_for_sublime". However, package control lists two packages when searching for tern: TernJS and tern_for_sublime, and installing the first rather than the second works just fine. Does the installation by term_for_sublime us an alternative installation method? (if so, would it make sense to delegate to package control, since that seems to work fine?)

marijnh commented 11 years ago

The TernJS package uses a custom server and a V8-Python bridge to run it. This package (tern_for_sublime) relies on node.js. Did you try the manual installation that it prompted you to try?

Pomax commented 11 years ago

Just tried that, and it runs without requiring any administrative privileges, finishing without errors. Is there an error log anywhere that I can paste into this issue that might offer a clue why it fails in Sublime itself?

Pomax commented 11 years ago

Oh, that said, if I try to use alt+. or alt+, in sublime text 2 for javascript files now, I get the error "could not find a definition"

marijnh commented 11 years ago

I've changed to code to display the process' output when it fails. That should help the next person running into this somewhat.

As for the jump-to-def problem, there are things where Tern can't find the definition. If you have a relatively self-contained example where it fails to find a definition that you feel it should be able to find, please open a new bug describing the situation in detail.