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 .
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 thing when it comes to security of your machine!
- How to add Fathom Analytics to Nuxt 3 - May 19, 2023
- How to use Azure Blob Storage - May 8, 2023
- How to use Azure Key Vault to manage secrets - April 30, 2023