(Spacemacs) Warning: tern binary not found!

启动 Spacemacs 时,提示(Spacemacs) Warning: tern binary not found!

目前已经确认过如下信息:

  1. Shell 的 tern path: $which tern —> /usr/local/bin/tern

  2. Emacs 的 exec-path: C-h v exec-path —>
    Its value is ("/usr/local/bin/" “/usr/bin/” “/bin/” “/usr/sbin/” “/sbin/” “/opt/X11/bin/” “/usr/local/aria2/bin/” “/Library/Frameworks/Mono.framework/Versions/Current/Commands/” “/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_9/” “/Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_9/” “/Applications/Emacs.app/Contents/MacOS/libexec/”)

  3. Emacs environmentpath: (getenv “PATH”) ----> “/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/aria2/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_9:/Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_9”

请问有可能是什么原因?

需要用 tern 的时候,exec-path 没准备好?另外,启动的时候为什么会需要用到 tern 呢?

npm install -g tern

仔细看我的问题第一条,shell里使用 which tern 可以找到 tern,并且可以运行。

应该是 JavaScript layer用到的吧。exec-path 没准备好,这个不应该吧,我只是在 dotspacemacs-configuration-layers 中加了一个 javascript layer,如果这个时候 exec-path 没准备好,那其他需要用到 exec-path 的 layer 肯定也会有问题。

使用 develop 分支已经解决,具体原因没查出来。

使用spacemacs的develop分支?

是的,我是使用develop分支后就没再发现这个问题。不过我现在用了最新的master分支,也没有这个问题了,怀疑是以前的一个bug吧,你用的哪个版本的spacemacs?

我在Mac上没问题, Windows上还是不行…

好吧,我是mac…

我自己也是Mac. 公司不给配Mac… 那个问题, 使用最新的 spacemacs 就没有了.