npm update only package.json code example
Example 1: update all dependencies npm
npm update //update all local packages
Example 2: npm update to latest
npm i -g npm@latest
npm update //update all local packages
npm i -g npm@latest