2

I just installed the latest version of nodejs, and while I can get it to run js files just fine, I can't get npm to do anything.

If I open the node.exe, it brings up a prompt, then I separately tried each of the following and none of them work:

> node npm install socket.io
> npm install socket.io
> help
> node help

ALL of the above result in nothing but the line "..." to be returned, then every thing I type in after that, I just get another line of "...".

This is extremely frustrating. What am I doing wrong?

1
  • I saw the same thing when I first tried npm after installing node. Just now I've tried it again and it is working. I have rebooted in the meantime but can't be sure that's what made the difference. Commented Dec 2, 2012 at 2:59

2 Answers 2

5

If you had command prompt open whilst installing the latest nodejs then the path to npm in windows path will not be recognised until you close the command prompt and open a new one.

I know this already has an accepted answer but I just found this and then realised my own mistake and thought it might help someone else.

Sign up to request clarification or add additional context in comments.

Comments

4

Opening node.exe will bring up the Read–eval–print loop (REPL). Try just:

c:\users\windowslogin>npm install socket.io

2 Comments

holy crap. I can't believe I didn't try that! haha. It feels like I had tried everything else. Thanks!
Ah! I bet I did the same thing last time and the right thing this time! (-:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.