How to install Node.js with node version manager(nvm)

Satish Mali
Oct 16, 2022

Using nvm(node version manager) it very easier to install and manage multiple version of Node.js. We can switch from one version to another version.

  • Download and run script
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
  • Restart terminal or update profile
    source ~/.bashrc
  • Verify nvm version
    nvm — version
  • Install latest LTS(Long Term Support) of Node.js
    nvm install — lts
  • Verify Node.js version
    node — version
  • List available version
    nvm ls-remote
  • Install specific version
    nvm install 16.18.0
  • Install latest release
    nvm install node
  • List installed version
    nvm ls
  • Switch to another version
    nvm use 14.16.0

You should now be all set to execute and work on your Node.js projects no matter which version of Node.js they are written for.
Need to identify version of project and according to this choose version and run/build projects.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Satish Mali
Satish Mali

No responses yet

Write a response