0
的NodeJS我试图建立与原子的NodeJS在Ubuntu 16.10原子。我遵循this link中给出的步骤。但是,当我编辑~/.atom/config.cson
文件错误settting了在Ubuntu
runner:
scopes:
js:”nodejs”
为链接给出凌给出了一个错误
Unexpected new line after runner:
我如何得到这正确吗?
编辑
使用丹Lowe的代码后,原子错误消失了,但代码犯规编译。
#!/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');'
它是无法看到的NodeJS?
IMO,此编辑大概应该是一个单独的问题。现在你已经转向完全不同的情况/问题。 –
@DanLowe:完成 - http://stackoverflow.com/questions/43580416/error-when-running-nodejs – Ashwin