Not able to proceed after download and installation of node.js

47 views
Skip to first unread message

Yadu nandan

unread,
Nov 28, 2014, 9:49:27 AM11/28/14
to nod...@googlegroups.com
node -v
ferenceError: node is not defined
  at repl:1:2
  at REPLServer.self.eval (repl.js:110:21)
  at Interface.<anonymous> (repl.js:239:12)
  at Interface.emit (events.js:95:17)
  at Interface._onLine (readline.js:202:10)
  at Interface._line (readline.js:531:8)
  at Interface._ttyWrite (readline.js:760:14)
  at ReadStream.onkeypress (readline.js:99:10)
  at ReadStream.emit (events.js:98:17)
  at emitKey (readline.js:1095:12)

Please help me out in resolving this issue.

Ryan Schmidt

unread,
Nov 29, 2014, 1:36:41 AM11/29/14
to nod...@googlegroups.com
It sounds like you have started the node repl (the Read-Eval-Print-Loop: a way of running JavaScript line by line for testing purposes) by running "node" with no arguments, and have then typed "node -v" into the repl. "node -v" is not a valid JavaScript command, so it is understandable that you get an error that "node" is not defined.

It sounds like you don't actually want to be in the node repl, but are trying to run a shell command to display the version of node. In that case, exit the repl by pressing Control-D, then run "node -v".



Danilo Sampaio

unread,
Nov 29, 2014, 1:39:34 AM11/29/14
to nod...@googlegroups.com
if you're using a recent Ubuntu version, the node command is 'nodejs' instead of 'node'. You need to manually create a symlink /usr/bin/node:

sudo ln -s /usr/bin/nodejs /usr/bin/node

which OS are you using?

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/5f23500a-502e-4ec4-b69e-e18e951684ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages