Ubuntu 14.04 nodejs and node conflicting

When trying to run commands on an ubuntu 14.04 server I was getting issues trying to install npm modules like pm2 and forever.

The issue seemed to be related to the nodejs-legacy package available via apt-get which didn't really work very well.

I ended up uninstalling this and manually installing node via these instructions:

sudo apt-get update
sudo apt-get --yes --force-yes install git
sudo apt-get --yes --force-yes install build-essential openssl libssl-dev pkg-config
wget http://nodejs.org/dist/v0.10.31/node-v0.10.31.tar.gz
tar zxvf node-v0.10.31.tar.gz
cd node-v0.10.31
sudo ./configure
sudo make
sudo make install
sudo npm install -g forever
sudo rm -rf ~/.npm

from https://www.digitalocean.com/community/questions/ubuntu-repo-nodejs-require-symlink-to-node-to-use-forever