add npm dependency to package.json code example
Example 1: how to install dependencies from package.json
npm install // installs dependencies listed in package.json
Example 2: install an npm package
npm install package-name
To save as a dependency:
npm install package-name --save