how to update outdated packages and also save in package.json code example Example: use npm to update packages to latest version npm i -g npm-check-updates ncu -u npm install