npm upgrade all package json code example
Example 1: how to update node modules
npm install --global upgrade-node-modules
Example 2: update node.js dependencies
npm install -g npm-check-updates
ncu -u
npm update
npm install
npm install --global upgrade-node-modules
npm install -g npm-check-updates
ncu -u
npm update
npm install