Node.js文件永远不会工作

Node.js文件永远不会工作,node.js,Node.js,我很难在Node.js上完成最基本的工作。我很确定它安装正确,但我可能错了。如果有人能帮我,因为我不懂。我像在线教程建议的那样保存了这个文件,但是当我尝试在Node.js中执行它时,它总是给我错误。我做错了什么 hello.js 你是在repl Donode hello.js中打开它的吗?是的,我一直在这样做,但没有任何效果。我在命令提示符、node.js命令提示符中尝试了几种方法,但总是出现一些错误 ReferenceError: hello is not defined at re

我很难在Node.js上完成最基本的工作。我很确定它安装正确,但我可能错了。如果有人能帮我,因为我不懂。我像在线教程建议的那样保存了这个文件,但是当我尝试在Node.js中执行它时,它总是给我错误。我做错了什么

hello.js

你是在repl Do
node hello.js中打开它的吗?是的,我一直在这样做,但没有任何效果。我在命令提示符、node.js命令提示符中尝试了几种方法,但总是出现一些错误
ReferenceError: hello is not defined
    at repl:1:1
    at sigintHandlersWrap (vm.js:22:35)
    at sigintHandlersWrap (vm.js:73:12)
    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
    at REPLServer.defaultEval (repl.js:340:29)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.<anonymous> (repl.js:538:10)
    at emitOne (events.js:101:20)
    at REPLServer.emit (events.js:188:7)
node hello.js
node hello.js
     ^^^^^
SyntaxError: Unexpected identifier