3

I have installed tern use npm and install tern.el from melpa. I put the path of tern.el in my init file as per instructions on the emacs section of the tern homepage. However when I enable tern mode and try to run a command such as jump to definition at point, I get the following error:

Searching for program: no such file or directory, tern

What is the issue?

user2522280
  • 939
  • 2
  • 7
  • 13
  • Have you installed tern, the external program? – PythonNut Jun 29 '15 at 21:21
  • Yes, I'm able to start the tern server from the command line. – user2522280 Jun 30 '15 at 01:59
  • I was having the same issue. I tried reinstalling tern and changing the path, but this didn't solved it. With --debug-init I found there was an issue in markdown-mode (which I load some lines before tern-mode). When I commented out the markdown-mode the message disappeared. – Choma Mar 03 '16 at 11:34

1 Answers1

3

I had the same issue. Tern was installed in /usr/local/bin, but emacs was not looking for it there. I added this to my init file to add /usr/local/bin to the path.

(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
    (setq exec-path (append exec-path '("/usr/local/bin")))
Connor
  • 1,591
  • 1
  • 19
  • 26