After installing Node.js on Ubuntu, when trying to run npm you may run into an error, npm: command not found. To install NPM on Ubuntu use the following set of commands

curl https://npmjs.org/install.sh | sudo sh