how to add a npm package globally code example
Example 1: npm install package as developer dependency
npm install --save-dev package
# example:
npm install --save-dev nodemon
Example 2: install npm package globally
npm install package-name -g
npm install --save-dev package
# example:
npm install --save-dev nodemon
npm install package-name -g