Languages
[Edit]
EN

Node - install selected Node.js and nvm version under Debian / Ubuntu

4 points
Created by:
GamerGoals22
364

In this short article, we would like to show how to install desired version of the Node.js or npm under Linux.

Warning: node will be installed per specific user only!

Quick solution:

 

Detailed instruction

Edit

Node: using below instruction we are able to switch between existing Node.js versions (npm versions too) - just go to step 4 in the below instruction.

Simple steps:

1. we need to download and install nvm script that let's to switch Node.js versions

1.1. install curl command only if you don't have it instelled yet:.

1.2. install nvm command: 

Note: check the last version on https://github.com/nvm-sh/nvm.

1.3 reload enviroment variables to have access to nvm command (or you can just restart your Linux): 

 

2. check avaialble Node.js versions:

Example output:

 

3. install selected Node.js version: 

Example output:

 

4. set installed Node.js as used/active one (this command can be executed on instaled versions before): 

Example output:

 

5. check Node.js and npm versions: 

 

See also

Edit
  1. Node.js - install selected Node.js version under Windows

Alternative titles

  1. Node - switch nodejs and nvm version under Debian / Ubuntu
  2. Node - switch Node.js version under Debian / Ubuntu (nvm switching)
  3. Node - change nodejs and nvm version under Debian / Ubuntu
  4. Node - install desired Node.js and nvm version under Debian / Ubuntu
  5. Node - install desired nodejs and nvm version under Debian / Ubuntu
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join