0

I am starting to learn Nodejs and tried to install it.

Now, when I do node -v I get v4.4.4 and when I do nodejs -v, I get v0.10.45

which node gives /usr/local/bin/node, which nodejs gives /usr/bin/nodejs

I need v4.4.4. Because of those different results I am not sure to start.

What can I do?

Jahongir Rahmonov
  • 13,083
  • 10
  • 47
  • 91
  • 1
    Related: [nodejs vs node on ubuntu 12.04](http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04) You have multiple installations of Node.js, one using the common command name (`node`), the other using an alternate name (`nodejs`) that avoided a conflict with an audio application already installed in Ubuntu. – Jonathan Lonowski May 15 '16 at 15:04

1 Answers1

2

I recommend installing NVM (node version manager). It makes dealing with multiple node version installations really nice. Digital Ocean has a good tutorial on doing that here:

https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server

Once you've installed NVM you can likely remove your other node versions and all of your programs that use node will default to whatever version you set as the default with nvm.

RutledgePaulV
  • 2,568
  • 3
  • 24
  • 47