use npm to install javascript modules code example
Example 1: import npm module node.js
import _ from 'lodash';
Example 2: install an npm package
npm install package-name
To save as a dependency:
npm install package-name --save
import _ from 'lodash';
npm install package-name
To save as a dependency:
npm install package-name --save