how to know if npm is installed code example
Example 1: intall npm
npm install -g npm
Example 2: check if a npm package is installed
npm list [package-name] || npm list -g [package-name]
npm install -g npm
npm list [package-name] || npm list -g [package-name]