install specific version on nodejs on ubuntu 21.10

Viewed 1501

I'm new to ubuntu 21.10 and recently I use ubuntu 20.04 after upgrading mu node package was upgraded to 12.22.0 and my node packages completely messed up now I want to install node 10.19.0 on my ubuntu how can id do this?

1 Answers
  1. You can downgrade npm by simple pasting a needed version:

For example:

npm install -g npm@3.10.10

Be sure that it's downgraded:

npm -v
  1. To downgrade nodejs, you can also do so by simple pasting a needed version.

For example:

$ npm install -g n
$ n 6.10.3

Be sure that it's downgraded:

$ node -v
v6.10.3

If it doesn't show up a needed version, you can try to run all commands above with admin privileges.

Related