how to install latest version of npm cli code example Example: update npm npm install -g npm@latest // for global install