Last active
September 12, 2019 06:52
-
-
Save imasif/6a24f8d37b7d73feaa6f3c96c6bbcd61 to your computer and use it in GitHub Desktop.
NodeJS multiple version management Linux/Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. We will be using 'n' for it. But before using `n` we need to install make; | |
$ sudo apt-get install make | |
2. Installing `n`: | |
$ curl -L https://git.io/n-install | bash | |
sets both PREFIX and N_PREFIX to $HOME/n, installs n to $HOME/n/bin, | |
modifies the initialization files of supported shells to export N_PREFIX and add $HOME/n/bin to the PATH, | |
and installs the latest stable node version. | |
3. . ~/.bashrc (reload .bashrc file) | |
##for mac it's simple: | |
Since you probably already have node, the easiest way to install n is through npm: | |
$ npm install -g n | |
Everything else can be found here: | |
https://github.com/tj/n#installingactivating-versions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment