how to update npm depended in npm package code example Example 1: npm update syntax npm update -g Example 2: npm update syntax npm outdated -g --depth=0