update current version op npm code example Example 1: upgrade npm version npm install -g npm@latest Example 2: update latest version of npm npm install -g npm@next