Skip to content

Instantly share code, notes, and snippets.

@psivakrishnareddy
Last active January 20, 2021 11:43
Show Gist options
  • Select an option

  • Save psivakrishnareddy/5848e5a248f5be6bd9be155437b62fdc to your computer and use it in GitHub Desktop.

Select an option

Save psivakrishnareddy/5848e5a248f5be6bd9be155437b62fdc to your computer and use it in GitHub Desktop.

Node Installation guide for Mac OS /Linux/Windows

Open your terminal & type

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

Close your terminal & reopen a new one & type

nvm ls

You will see something like

system
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
nvm_list_aliases:36: no matches found: /Users/adeelimran/.nvm/alias/lts/*

Make Sure Your .bash_profile has nvm path

export NVM_DIR=~/.nvm # This has to be present by default after install

Next->

source ~/.nvm/nvm.sh
source .bash_profile

Next restart terminal and type

nvm install 12.16.1

Once it is installed, we can start using it

nvm use 12.16.1

Now that it is installed let's check it by doing

node --version // will output v12.16.1

Uninstall NVM

rm -rf $NVM_DIR ~/.npm ~/.bower

Installation guide for Windows

Nvm can be used to manager various node version:

  • Step1: Download nvm https://github.com/coreybutler/nvm-windows/releases
  • Step2: Choose nvm-setup.zip
  • Step3: Unzip & click on installer.
  • Step4: Check if nvm properly installed, In new command prompt type nvm
  • Step5: Install node js using nvm : nvm install : The version can be a node.js version or "latest" for the - latest stable version
  • Step6: check node version - npm -v
  • Step7: If you want to install another version of node js - Use STEP 5 with different version.
  • Step8: Check list node js version - nvm list
  • Step9: If you want to use specific node version do - nvm use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment