I am new to node.js
I just finished installing it on my windows machine. Actually i'm following a tutorial on tutorialspoint. After the installation I was told to create a main.js file and put the following code in the file.
/* Hello, World! program in node.js */
SyntaxError: Unexpected identifierat Object.exports.createScript
at REPLServer.defaultEval (repl.js:221:25)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:412:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)
Sounds like you are in the REPL. Try to hit
ctrl + c a couple of times and see if you exit out to the command prompt. THEN try running
node main.js. You should see your desired output.