global packages install code example
Example 1: npm install package globally
#Syntex
npm install packagename -g
#example
npm install express -g
Example 2: how to install npm packages globally
npm i -g <package>
#Syntex
npm install packagename -g
#example
npm install express -g
npm i -g <package>