【问题标题】:Emacs + tern plugin on mac os x "no such file or directory: tern"Mac os x上的Emacs + tern插件“没有这样的文件或目录:tern”
【发布时间】:2016-03-06 22:58:48
【问题描述】:

我使用的是 Mac Os X 10.11, 我有一个全新安装的 Emacs(Emacsformacosx.com),我正在尝试为 javascript 安装 tern 插件。 我遵循简单的命令: -npm install tern -g 使用 el-get 我安装自动完成和 tern 我复制了激活 tern-mode 的 tern 站点指示的短代码 sn-p 另外,我添加了安装 tern 的路径(~/.emacs.d/el-get/tern/emacs) 当我在 emacs 中激活 tern 模式时,我得到“没有这样的文件或目录 tern”,但我可以从终端运行它,所以我不知道是什么问题

【问题讨论】:

  • 我明白了一些东西,也许可以帮助你帮助我。在 el-get install 期间,他尝试执行 npm --production install。无需安装任何软件包。它给出了错误。怎么修我不知道。我明天要在linux上试试
  • 燕鸥在您的exec-path 中吗?在 OSX 上,考虑使用 exec-path-from-shell github.com/purcell/exec-path-from-shell
  • 有道理。所以我正在安装它,我知道我在我的 .zshrc 中设置了我的“PATH”和“MANPATH”,这是真的,它要求我将它们设置在 .profile 或 .zshenv 或 .bash_profile 中,因为我安装了 oh-my-zsh 我在 -zshenv 中复制了 export PATH ****** 行,它不存在,但它不起作用。我还能做些什么来让 exe-path*** 正常工作吗?
  • 好的,因为我无法成功安装 exer-path-from-shell,但感谢 rimero,我明白了问题所在。我通过以下方式对其进行了修复: (add-to-list 'exec-path "/usr/local/bin") 这是使用 npm brew 安装的所有内容所在的文件夹。谢谢你。我希望其他在 OS X 和 Emacs 上遇到问题的人能找到这个页面并解决他们的问题。

标签: javascript emacs tern


【解决方案1】:

尝试全局安装tern。在某些情况下,它有助于工作。在运行 tern_for_vim 时检查启动 tern.js 服务器的不同类型:https://github.com/ternjs/tern_for_vim/blob/994ffbe783da36d67786b6c66a4bf784c5eab300/autoload/tern.vim#L15

对于全局安装需要运行:npm install -g tern

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-13
    • 2012-08-28
    • 2012-11-21
    相关资源
    最近更新 更多