I am using Mac Os X 10.11, I have a fresh installation of Emacs(Emacsformacosx.com), and I am trying to install tern plugin for javascript. I follow the simple commands: -npm install tern -g with el-get i install auto-complete and tern I copy the short code snippet indicated from the tern site that activate tern-mode plus i added the path where tern is installed in my case (~/.emacs.d/el-get/tern/emacs) and when I activate the tern-mode in emacs I get "No such file or directory tern" but from the terminal I can run it, so I cannot figure out what is the problem
Asked
Active
Viewed 1,336 times
4
-
I understood something more maybe can help you to help me. During el-get install he tries to do npm --production install. without any package to install. And it gives error. How to fix it I don't know. I am going to try it on linux tomorrow – GDG612 Mar 06 '16 at 23:11
-
Is tern in your `exec-path`? On OSX, consider using `exec-path-from-shell` https://github.com/purcell/exec-path-from-shell – rimero Mar 07 '16 at 02:12
-
It makes sense. So I am installing it, and I get that I set my "PATH" and "MANPATH" in my .zshrc, and it is true, and it asks to me to set them in .profile or .zshenv or .bash_profile, because i have oh-my-zsh installed i copied the line export PATH ****** in -zshenv that it didn't exist, but its not working. Is there something else i can do to have exe-path*** working? – GDG612 Mar 07 '16 at 17:44
-
Ok because I haven't been able to install successfully exer-path-from-shell, but thanks to rimero I understood which was the problem. I fixed it in the following way: (add-to-list 'exec-path "/usr/local/bin") that is the folder where everything installed with brew of npm goes. Thank you. I hope other people in troubles with OS X and Emacs find this page and fix their problems. – GDG612 Mar 07 '16 at 18:44
1 Answers
0
Try to install tern
globally. In some cases it help to work. On run tern_for_vim
check different types for start tern.js server: https://github.com/ternjs/tern_for_vim/blob/994ffbe783da36d67786b6c66a4bf784c5eab300/autoload/tern.vim#L15
For global install need run: npm install -g tern

witem
- 11
- 2