Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

453
Vistas
How can I update NodeJS and NPM to the next versions?

I just installed Node.js and npm (for additional modules).

How can I update Node.js and the modules which I'm using to the latest versions?

Can npm do it, or do I have to remove and reinstall Node.js and npm to get the next versions?

I followed this steps in the npm section.

over 4 years ago · Santiago Trujillo
4 Respuestas
Responde la pregunta

0

It's very late, but I give my answer so that it will help somebody who is stuck there. You can update in many ways as described above, so here I am discussing the most popular and easy way to update nodejs and npm.

 1)Update via library n 

 2)Update via nvm

Open your terminal I am using Ubuntu (Linux)

1)You can install n as any node module (globally)

npm install -g n

OR

you can also install from the source if you want

cd /tmp
git clone --depth=1 https://github.com/tj/n
cd n
sudo make install

After installation hit the below command to install the latest version of node

n latest 

now check node -v (you see the latest version is installed)

It will install the latest stable version of node.

n stable

Or you can install any version by adding version number against n like

n 0.10.33          # Install and use v0.10.33

You can check more regarding n in the following link click here

2)Now comes to second approach using NVM Install

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

After installation hit the below command to install latest version of node

nvm install node 

You can list available versions using ls-remote:

nvm ls-remote

If you want to install a specific version

nvm install 6.14.4 

To use any version after installation

nvm use node

Update npm to latest one

nvm install-latest-npm

Hope it will help!

over 4 years ago · Santiago Trujillo Denunciar

0

Use NVM to manage node version, it will automatically take care of npm.

over 4 years ago · Santiago Trujillo Denunciar

0

To install the latest version of npm using npm:

sudo npm install npm@latest

I run this on Linux so I am not sure about other operating systems.

On Linux you can also run:

sudo apt-get update
sudo apt-get upgrade

This will tell the apt-get package manager to update and upgrade all packages.

over 4 years ago · Santiago Trujillo Denunciar

0

sudo n list => show the list of installed versions sudo n stable => install latest stable version.

You can also use nvm to install latest version or change between different versions.

For latest npm version: npm install -g npm@latest

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda