Skip to content

Instantly share code, notes, and snippets.

@arnabsen1729
Last active September 25, 2021 09:51
Show Gist options
  • Save arnabsen1729/9b8bdde67fda6db40c1e1b9c7f7a56cf to your computer and use it in GitHub Desktop.
Save arnabsen1729/9b8bdde67fda6db40c1e1b9c7f7a56cf to your computer and use it in GitHub Desktop.
Installing nvm and the latest Node JS

nvm is a version manager for node.js, It helps to easily switch between various versions of node very easily.

Install nvm and node

Windows

Follow the steps here.

Linux/Mac

  1. Download the nvm install script via cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
  1. Ensure that nvm was installed correctly with the following command. It should give you the version of the nvm installed.
nvm --version
  1. Now install the latest node.
nvm install node
nvm use node
  1. To check if node was installed properly, run:
node -v

Install package manager

pnpm is a very fast, disk space efficient package manager. To install it globally run:

npm -g i pnpm

The -g flag represents that this pnpm will be isntalled globally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment