Node.js 在ubuntu上使用nodejs设置atom时出错

Node.js 在ubuntu上使用nodejs设置atom时出错,node.js,atom-editor,Node.js,Atom Editor,我正在尝试在ubuntu 16.10上用atom设置nodejs。我遵循中给出的步骤。但是当我将~/.atom/config.cson文件编辑为 runner: scopes: js:”nodejs” 如链接中所示,Atom给出了一个错误 Unexpected new line after runner: 我怎样才能把这个弄对呢 编辑 使用Dan Lowe的代码后,atom错误消失了,但代码没有编译 #!/usr/bin/env nodejs var http = require('

我正在尝试在ubuntu 16.10上用atom设置nodejs。我遵循中给出的步骤。但是当我将
~/.atom/config.cson
文件编辑为

runner:

scopes:

js:”nodejs”
如链接中所示,Atom给出了一个错误

Unexpected new line after runner:
我怎样才能把这个弄对呢



编辑
使用Dan Lowe的代码后,atom错误消失了,但代码没有编译

#!/usr/bin/env nodejs
var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(8080, 'localhost');
console.log('Server running at http://localhost:8080/');
它给出了错误

./server.js: line 3: syntax error near unexpected token `('
./server.js: line 3: `var http = require('http');'

是否无法看到节点?

如果这是您正在使用的实际配置,则有两个问题

  • 这些线没有缩进

  • 节点周围的
    nodej
    是智能引号,而不是普通的双引号。这在这里是无效的语法

  • 你可能想要这个

    runner:
    范围:
    js:“nodejs”
    
    错误现在不会出现。但是我在编辑中添加的简单程序甚至无法编译。我不确定它是否能够看到nodejs.IMO,这个编辑可能应该是一个单独的问题。你现在进入了一个完全不同的情况/问题。@DanLowe:Done-