update an npm package to the latest code example Example 1: npm update npm update --save Example 2: npm update to latest npm i -g npm@latest