Best way to install Node.js and NPM

Node.js strongly recommend using a Node version manager like n to install Node.js and npm. They do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

Install n directly from Github:

curl -L https://bit.ly/n-install | bash

Then check your versions (remember than node comes with npm)

node --version && npm --version

Note: if you are already having problems, first remove everything related with Node.js and NPM