npm i latest packages code example
Example 1: npm update
npm install -g npm@latest
Example 2: npm update syntax
npm update -g <package_name>
Example 3: npm update syntax
npm outdated -g --depth=0
npm install -g npm@latest
npm update -g <package_name>
npm outdated -g --depth=0