JONDJONES.COM
  • About
  • CMS
  • Clean C#
  • Javascript
  • Resources
  • Ask Jon
  • Hire Me
  • Contact
Follow Me
  • ;

what are you looking for?

JONDJONES.COM
  • About
    About Me
    • Who Is Jon D Jones?
    • Things I Use
    • My Projects
    How You Can Help
    • How You Can Support This Site
    • Submit A Guest Post
  • CMS
    CMS Tutorials
    • Umbraco
    • Sitecore
    • Episerver
    Resources
    • Episerver: The Missing Manual
    • #ILoveEpiserver
    • #ILoveUmbraco
  • Clean C#
    • TDD
    • Clean Code
    • Devops
    • Faster Page Load Times
    • Developer Tool Tutorials
  • Javascript
    Tutorials
    • Javascript
    • React
    • CSS
    Resources
    • #ILoveJavascript
    • Dev Tools List
    • #ILoveReact
  • Resources
    Free Guides
    • Shit My Websites Down...
    • #ILoveJavascript
    • #ILoveReact
    • #ILoveTechnicalInterviews
    • Land Your First Contract
    Books
    • Episerver Missing Manual
  • Ask Jon
  • Hire Me
    My Services
    • Umbraco Freelancer
    • Episerver Freelancer
    • Sitecore Freelancer
    • Javascript Freelancer
    My Company & Experience
    • Digital Prompt
    • My Portfolio
    • LinkedIn Profile
    • Stackoverflow CV
  • Contact

Installing Node With NVM

  • Homepage
  • Frontend
  • React
  • Getting Started React
  • Installing Node With NVM

In this tutorial, you will learn about NVM and how you can use it to install Node.js.  NVM stands for Node version manager.  You can use NVM to install Node. If you are starting off with Node then simply install it on your computer will do.  When you work in a large company and you have multiple projects to work on, things become trickier.

Like all good programming languages, node release updates every once in a while.  With each new update of node comes new features, syntax improvements etc..  if you write a script in Node 10 using some new feature, then it might not run in Node 8.  At work, if you have two apps, one that only works on Node 10, one that works on Node 8, what do you do?  Constantly, uninstalling and re-installing Node is a pain...this is where NVM comes into play.  NVM is an essential tool to know about because of out-of-the-box Node will just install itself.

How To Install NVM

You can install NVM via homebrew.  You can download homebrew using instructions from here, using this command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After installing homebrew, close and open your terminal, then type:

brew update
brew install nvm

Next, type in:

mkdir ~/.nvm

Next, you will likely need to create and configure a bash profile and create an alias for NVM.  You can do this within the terminal, by typing:

nano ~/.bash_profile

In here, if you do not see anything related to NVM then add in this snippet:

export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh

Save the file (CTRL + O) then (CTRL + X). Close and re-open the terminal. type,now type:

nvm --version

If everything has gone according to plan it should load OK.

How To Install NPM with NVM

Now you have NVM installed, we can install Node. To install Node you can type:

nvm install node

Use the latest version with:

nvm use node

To install the latest version:

nvm install --lts
nvm use --lts

 

Installing Node With NVM
Installing Node With NVM
Quick And Dirty Guide To Deploying Your React App
Quick And Dirty Guide To Deploying Your React App
Tips When Using JSX With React - It's All Javascript!
Tips When Using JSX With React - It's All Javascript!
What Makes Up A React Component?
What Makes Up A React Component?
FOUND THIS TUTORIAL USEFUL? PLEASE CONSIDER DONATING
FREE BOOK
Shit My Websites Down
DOWNLOAD NOW

Subscribe

Join us today and get instant access to FREE books

YOU ARE A LEGEND!

You just made.. THE LIST!

SUPPORT THIS SITE
CLICK AN AD!

WELCOME

Hi, I'm Jon, I write articles about creating and optimizing websites to help your business meet its goals. I am a technical architect and technology fanatic by profession. You can find out more about me by joining my newsletter.

Latest Posts
  • Umbraco V8 Fails To Load On Remote Server
  • How To Enable Optional Chaining Within Your Javascript Project
  • How To Call An API Within A React.js App
  • Quick And Dirty Guide To Deploying Your React App

© Jon D Jones