NodeJS

Install nodejs with nvm on OSX





There 3 different ways to install Node.JS on OSX, in this post I will provide instructions on how to do it using Node Version Manager.

For easier instructions on how to install NVM on MacOS check out my company blog post

Install NVM on MacOS

Why Node Version Manager (NVM)

Node.JS is a popular framework for the developing applications and has been available since 2009.  As with any software development frameworks node is under constant development, with the team making improvements, bug fixes and has undergone it own fair share of forking and merging. This will result in different versions of the software available.

NVM is similar to Ruby’s RVM, allowing you to install and switch between different versions of Node.JS and NPM using the command line. It’s super useful to developers especially if you have to support applications which have been developed utilising different versions of the framework.

Installing Node using NVM on  OSX

Node Version Manager (NVM) lets you install multiple versions of Node.js to your local user directory, enabling easy upgrades and version switching, without the permission troubles that are common with non-NVM setups.

If you have previously installed Node on your Macbook, you will need to uninstall. If you have installed node using HomeBrew  .

Install HomeBrew on Mac




If you have previously installed node using HomeBrew, ensure that you uninstall it before you proceed

To install NVM, we will need to clone to the Git repository

Once complete you can check which version of of nvm has been installed

We can now install any node version we desire.

We can now easily switch between different versions of node

We can also check which version of node is currently in use by

We can also check which versions of node are available in your nvm instance by

There are a number of benefits to making use of NVM on your development machine, not only can you host multiple versions of the node framework on your machine but also ensure you no longer require to use sudo to install npm packages – Which is a really good thng when it comes to security of your machine!




Gary Woodfine

Freelance Full Stack Developer at threenine.co.uk
Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines.

A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.

Latest posts by Gary Woodfine (see all)

Affiliate Disclaimer

Disclosure: Please note that some of the links included in the blog posts are affiliate links, which means I will earn a commission if you decide to make a purchase.

I only include affiliate links to products, services and companies that I have personal experience and have actually used. I only recommend them because they are helpful and useful, not because of the small commissions I make if you decide to buy something.

Please do not spend any money on these products unless you feel they are relevant, suitable and will help you achieve your goals.

Buying anyone of these products and the commisions earned will not make me an overnite multi millionaire, but they will help to cover the hosting costs and compensate for the countless hours and effort I put in to create meaningful and valuable free content I provide to help others succeed.

You've also undoubtedly noticed that I also use various advertising networks - unless of of course you're using an Ad blocker, this is also an attempt to reduce my monthly deficit I experience in providing free relevant, valuable and on occassion insightful content for the benefit of others.

I only really make some money if people click on the ads, unless of course you consider 1c per 1000 impressions real money!

Bear in mind just how many impressions I need to make before I can cover my £20 hosting costs a month!

If you are using an adblocker and guilt stricken you can of course donate using any of the buttons below, but I won't be holding my breath.

Buy me a coffeeBuy me a coffee

π