Ir al contenido principal

Update NPM to the latest version (in a nutshell)

To update npm itself to its latest version, run the command:

npm install -g npm@latest

If working on Linux/Mac, chances are that you need superuser rights, so prefix the above command with sudo:

sudo npm install -g npm@latest

Finally, to check the version before and after updating, run the command

npm -v

Comentarios