Path for nodejs and npm is different

I am using Ubuntu 14.04LTS

I am having nodejs(default package) at path /usr/bin/nodejs

I am having npm at path /usr/local/bin/npm

When I run npm -v It says

bash: /usr/local/bin/npm: /usr/local/bin/node: bad interpreter: No such file or directory

I tried installing the npm with the command below as

$ sudo curl -L https://npmjs.org/install.sh | sh

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 193 100 193 0 0 159 0 0:00:01 0:00:01 --:--:-- 160 100 6711 100 6711 0 0 3028 0 0:00:02 0:00:02 --:--:-- 8876 npm cannot be installed without nodejs. Install node first, and then try again.

Maybe node is installed, but not in the PATH? Note that running as sudo can change envs.

What can be done in order to run npm here?

First remove your current nodejs and npm, then install with nvm (Node Version Manager).
To install:

$ curl https://raw.githubusercontent.com/creationix/nvm/v0.17.1/install.sh | bash

nvm is a version manager similar to rvm(ruby) and gvm(groovy)