【问题标题】:SublimeLinter not detecting my Node.js installation (Debian)SublimeLinter 没有检测到我的 Node.js 安装(Debian)
【发布时间】:2013-05-04 14:05:46
【问题描述】:

我正在运行 Debian Squeeze,并且我已经使用 nvm 安装了 node.js。

我从 .bashrc 获取 nvm.sh 并将我的版本设置为默认版本:

source ~/.nvm/nvm.sh

从终端运行 node 有效,但 SublimeLinter 似乎没有检测到它:

SublimeLinter: javascript disabled (One of the following JavaScript engines must be installed: node.js, JavaScriptCore)

我在/opt/bin(在我的路径中)创建了一个符号链接:

$ cd /opt/bin
$ ln -s ~/.nvm/v0.10.3/bin/node

还是同样的问题。

我能做什么?

【问题讨论】:

    标签: debian sublimetext2 sublimelinter


    【解决方案1】:

    在命令提示符下,运行which node,然后打开Preferences -> Package Settings -> SublimeLinter -> Settings - User并设置如下(假设没有其他内容):

    {
        "sublimelinter_executable_map":
        {
            "node": "/opt/bin/node" // put results of 'which node' here
        }
    }
    

    另外,请记住,您需要在系统上设置gjslint(如果这是您想要的 linter),它才能工作。 JSHint 和 JSLint 是内置的,通过调整javascript_linter 选项来设置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-15
      • 1970-01-01
      • 1970-01-01
      • 2015-02-12
      • 2017-12-20
      相关资源
      最近更新 更多