how to tell npm to install global code example
Example 1: install an npm package
npm install package-name
To save as a dependency:
npm install package-name --save
Example 2: how to install npm packages globally
npm i -g <package>
npm install package-name
To save as a dependency:
npm install package-name --save
npm i -g <package>