Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emacs unable to start tern on win 7 #429

Closed
expez opened this issue Nov 27, 2014 · 8 comments
Closed

emacs unable to start tern on win 7 #429

expez opened this issue Nov 27, 2014 · 8 comments

Comments

@expez
Copy link

expez commented Nov 27, 2014

Typing slows to a crawl as emacs expends resources trying to start tern. Eventually this is shown:

Error running timer: (file-error "make client process failed" "connection refused" :name "127.0.0.1" :buffer #<killed buffer> :host "127.0.0.1" :service 54006 :nowait nil)

How can I possibly debug this? Does the vague error message indicate that tern was successfully started, but the client is unable to connect?

@expez
Copy link
Author

expez commented Nov 28, 2014

If I start the server manually with --persistent and --verbose everything seems to work just fine.

@marijnh
Copy link
Member

marijnh commented Dec 4, 2014

Spawning processes cross-platform seems to be a major challenge. Do you have any running node processes when this runs? When you look at your tern-command variable, does it point at the correct file, and does running that command from a shell work?

@expez
Copy link
Author

expez commented Dec 4, 2014

tern-command is ("node" "tern"). With no other running node processes.

I've tried hitting C-h v a few times to see if tern-command changes, but it does not.

@marijnh
Copy link
Member

marijnh commented Dec 4, 2014

That's the fallback you get when tern.el can't find the Tern binary. Either set tern-command yourself in your .emacs (to hold ("node" "c:/path/to/actual/tern/bin/tern")), or figure out why the script isn't finding Tern relative to its own path (did you copy it somewhere? did you properly install Tern's JavaScript module?)

@expez
Copy link
Author

expez commented Dec 4, 2014

right, I had initially set it to point to another path, but since I have tern on path that probably doesn't matter? In any event, I've never been able to do C-h v <tern-command> and see a filename included.

@marijnh
Copy link
Member

marijnh commented Dec 4, 2014

This is the code that initializes that variable. It is set only once, at startup, so repeatedly querying it won't reveal anything new. You could try debugging why (file-exists bin-file) is returning false.

@expez
Copy link
Author

expez commented Dec 4, 2014

When you look at your tern-command variable, does it point at the correct file,

Misunderstood you here and thought it might get updated with arguments for tern i.e. the file in use atm. I'll take a look at bin-file when I'm back at work tomorrow. Thanks!

@expez
Copy link
Author

expez commented Jan 14, 2015

bin-file: /path/to/.emacs.d/elpa/bin/tern where nothing is to be found.

The cause of the problem is this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants