Question

I have the latest version of Emacs and Tern but I have a problem with using the plugin. When I use any Tern-related commands I get this command from editor:

Wrong type argument: listp, "Could not start Tern server
env: node: No such file or directory.
"

As far as I know, Tern uses NodeJs to do it's job, I have the latest version of NodeJs also but I don't know why I get this error.

Était-ce utile?

La solution

Add the following line to your init file, replacing the path for node if necessary depending on where node is installed:

(setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH")))

Autres conseils

I used to have the same problem and just make it work. The thing is that the plugin have hard coded tern-command path. So I modify the path to "/usr/local/bin/tern".

And because I install the plugin with emacs 24's package, I have to delete tern.elc in the plugin folder and recompile it by C-u 0 M-x byte-recompile-directory.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top