npm update upgrade install code example Example 1: upgrade npm npm i -g npm-upgrade Example 2: upgrade npm version npm install -g npm@latest