2

I just installed node.js and i also set PATH in environment variables. PATH value is

C:\Program Files\Java\jdk1.8.0_25\bin;C:\android\adt\sdk\platform-tools;C:\android\adt\sdk\tools;C:\wamp\www\ant\bin;C:\Program Files\nodejs;

in short term

 <jdk bin dir path>;<android platform-tools dir path>;<android tools dir path>;<apache ant bin dir path>;<nodejs path>

android command working properly.

but when i execute node command ,it is not responding.

i wait for response around 30 mints but nothing happened.

after node command

now if i pressed enter then cmd look like bellow image

after pressing enter

I am new with node.js , please help me what is the issue.

Thank you in advance.

Community
  • 1
  • 1
Manoj Prajapat
  • 1,057
  • 1
  • 14
  • 26
  • Looks like it's working perfectly. The "node" program itself is simply an interpreter for the NodeJS language. You haven't given it any actual program to run. – Lee Daniel Crocker Dec 01 '14 at 20:43
  • hello , thanks for comment , actully i have to install ionic framework so i am following bellow video : https://www.youtube.com/watch?v=RNrNIHQ9cWo#t=480 my node command is not working as in video that's why i am confused. – Manoj Prajapat Dec 01 '14 at 20:44

1 Answers1

2

When you write just node your console enters "node mode" not bash or windows shell anymore. That is basically like a browser console, JavaScript welcome :)

What you want to do is run/open some ".js" file for example and do node index.js. That will run the code inside that index.jsfile.

Sergio
  • 27,160
  • 10
  • 79
  • 126
  • hello , thanks for ans , actully i have to install ionic framework so i am following bellow video : https://www.youtube.com/watch?v=RNrNIHQ9cWo#t=480 my node command is not working as in video that's why i am confused. – Manoj Prajapat Dec 01 '14 at 20:41
  • @ManojPrajapat yeah, but your images look good. Just get out of the "node mode", back into having `c:\etc..` in your path and do `npm` where you did node before, It should work fine. – Sergio Dec 01 '14 at 20:43
  • Thank you for your comment. I run command npm but it look like this : http://s30.postimg.org/ewon972s1/nodejs_error_3.png – Manoj Prajapat Dec 01 '14 at 20:50
  • 1
    @ManojPrajapat that is the next problem. Check here: http://stackoverflow.com/q/25093276/2256325 – Sergio Dec 01 '14 at 20:52
  • Thank you :) yes npm command run successfully , but the old problem still exist. node command has same issue. – Manoj Prajapat Dec 01 '14 at 20:56
  • @ManojPrajapat which old problem? – Sergio Dec 01 '14 at 20:56
  • undefind after node command ? please check image : http://i.stack.imgur.com/QJVXN.png and in video when press enter cmd back to its normal command area. – Manoj Prajapat Dec 01 '14 at 20:58
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65990/discussion-between-manoj-prajapat-and-sergio). – Manoj Prajapat Dec 01 '14 at 21:00
  • @ManojPrajapat but that is correct! Do `var x = 20;` you will also get undefined and the write just `x` that will print `20`. When the prompt is just `>` that means you are in node interpreter mode, wich accept JavaScript – Sergio Dec 01 '14 at 21:00
  • now last question , how can i back from node mode ? mean which command bring me back to normal as when cmd lunched ? – Manoj Prajapat Dec 01 '14 at 21:06