Update Ode.js in Ubuntu

Asked

Viewed 722 times

0

I’m not able to update Node.js in Ubuntu.

I did the installation, but it appears that the version was installed:

Node = V8.10.0

Npm = v5.3.2

On the site it says that the latest version is 10.16, why was not installed the latest version? How to upgrade to the latest version?

I’ve followed several tutorials on the internet, none helped me to update.

I’m having trouble running an application of mine that I had done in windows. Now trying to run linux from these errors:

inserir a descrição da imagem aqui

  • And how did the installation?

  • Hello @Andersoncarloswoss I have followed the instructions of several sites, which I remember now, looking at these sites: (https://github.com/nodesource/distributions/blob/master/README.md) and (https://www.digitalocean.com/community/tutorials/como-instalar-o-node-js-no-ubuntu-16-04-pt) Thank you.

  • On the first link there are installation specifications for each version of Node. Which one used?

  • @Andersoncarloswoss Node.js v12.x: curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - and then sudo apt-get install -y nodejs

1 answer

1


install using the nvm.

Run these commands on the terminal:

sudo apt-get update

and then:

sudo apt-get install build-Essential libssl-dev

To download the NVM installation on Github type this code into the terminal:

curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o 
  install_nvm.sh

Then run this command:

bash install_nvm.sh

After that, type in the terminal:

source ~/. profile

Now with NVM installed, next step is to check the versions on Nodejs:

nvm ls-remote

Then just choose the version you want to install:

nvm install v12.13.1

This circumvents the problem of installing nodejs always come with version 8.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.