JS App Development

JS App Development

  • Docs
  • Blog
  • Community

›References

Roadmaps

  • Getting Started
  • General Topics
  • Backend Development
  • Node.js
  • Express Framework
  • Table Databases
  • Document Databases
  • Frontend Development
  • Javascript
  • React

References

  • Node version management
  • Terminal Basics
  • Semantic Versioning

Managing different node versions using n

For development purposes, we might have to switch between multiple node.js version when working across different projects. To help managing different node versions, we can use the open source tool called n

Installation

If you already have node installed in your project, you can install n using the following command

npm install -g n

If you don't have node installed, you can use one of the third party installers like n-install using the following command

curl -L https://git.io/n-install | bash

Basic Usage

Simply execute n <version> to download and install a version of node. If <version> has already been downloaded, n will install from its cache.

n 10.16.0
n lts

Execute n on its own to view your downloaded versions, and install the selected version.

$ n

  node/4.9.1
ο node/8.11.3
  node/10.15.0

Use up/down arrow keys to select a version, return key to install, d to delete, q to quit (You can also use j and k to navigate up or down without using arrows.)

If the active node version does not change after install, try opening a new shell in case seeing a stale version.

← ReactTerminal Basics →
  • Installation
  • Basic Usage
JS App Development
Docs
Getting StartedGeneral TopicsBackend RoadmapFrontend Roadmap
Community
User Showcase
More
BlogGitHubStar
Follow @dani_akash_
Facebook Open Source
Copyright © 2019 DaniAkash