Youssef Neema
Youssef Neema

Reputation: 1

Change the version of node with the terminal Linux Ubuntu

I have problem with nodejs I tried to get a new version but didn't work. I deleted the old version 12.** after that I installed the new one 19.x. when I tap node -v it giving me this

1

What can I do ?

I search for the storage capacity thinking that was the problem but it isn't !

Upvotes: 0

Views: 1115

Answers (1)

Mehar Obaidullah
Mehar Obaidullah

Reputation: 59

You can use NVM for installing and switching node version on Ubuntu.

First NVM command line tool.

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

Then

For installing new node version.

nvm install 14

For switching node version.

nvm use 14

Done :)

node -v
v14.18.0

Upvotes: 1

Related Questions