updating npm packages to latest version code example
Example 1: upgrade npm
npm i -g npm-upgrade
Example 2: upgrade npm version
npm install -g npm@latest
Example 3: update all dependencies npm package.json
npm i -g npm-check-updates
ncu -u
npm install