npm update --save-dev code example Example 1: npm update npm update --save Example 2: npm update to latest npm i -g npm@latest