我如何在 atom 中 运行 js?保存文件时出现 bash 错误

how do I run js in atom? I get a bash error when saving the file

我正在学习 javascript 并尝试 运行 我的原子代码。我已经安装了 node.js,但是当我保存文件时,我得到:

bash: -c: line 0: unexpected EOF while looking for matching `''
bash: -c: line 1: syntax error: unexpected end of file
[Finished in 0.137s]

我在桌面上将文件另存为 learning.js。对不起,如果这很含糊

node <filename.js>

您需要像 node learning.js 这样调用节点,而不是调用 bash.