Body
Complete development environment install instructions that include Python, git, AWS CLI and more are available in the Knowledge Base article Development Environment: Getting Started.
This article is intended to provide supplemental instruction.
If you do development or cloud infrastructure work across various platforms, you should use Node Version Manager (NVM) to maintain Node on your machine. Even if you are not developing in Node, many scripts and development environments use Node packages behind the scenes to perform builds, deploys, and even spin up a local test environment in the browser.
However, each platform might require a different version of Node. For example, Ellucian Experience SDK uses v18, some build tools use v12, and everyday tasks may require the latest version.
Node Version Manager allows you to have multiple versions of Node installed on your machine to meet the requirements of different environments. It also provides easy installation, updates, and deletions of Node.
Basic Installation
Follow the instructions from Free Code Camp NVM Install Guide
(See Additional Resources below for alternate documentation)
Check Installed Versions
# Verify Install or Check Version of NVM
command –v nvm
# To see a list of what you have available:
nvm ls
Add Node Versions and Set a Default
Between changes you may need to start a new terminal session.
It is recommended that you install and maintain using Major versions and not get into the specifics of 22.1.4.
Only install EVEN numbered versions. (Why?)
# Install Node Versions you will use. For example:
nvm install 12
nvm install 18
nvm install 22
# When you install multiple versions, you can set a default
# Pick the ONE you most frequently use as your default
nvm alias default 18 # set default to 18
nvm alias default 22 # or set default to 22
Switch Between Versions of Node
# To switch between versions:
nvm use default
nvm use 22
nvm use 18
nvm use 12
# See what version you are currently using
nvm current
# -- OR --
node -v
Specify a Version of Node for a Project
If projects require varying versions, you can add an .nvmrc file to the project root.
This not only helps in documenting what version of Node the project uses, but also allows easy switching.
# In the root of your project directory run the following bash command
"18" > .nvmrc
Or just "Create New File" and enter the text 18 without quotes as it's contents.
Once you have an .nvmrc file you can use the following command inside your project root to switch to the correct version.
nvm use
You'll need to do this every time you open a new terminal.
Update a Version of Node
You should regularly update to the latest version of a Node major release. For example, make sure you have the latest version of Node 20, 18, etc.
To update, simply run the nvm install command. You can use -ls to list the currently installed versions.
nvm ls
nvm install 22 # will update to lastest version of 22 if already installed
Uninstall a Version of Node
First, list out what versions you have installed via NVM.
nvm ls
Uninstall the version you no longer need using the version number listed from the nvm ls command.
nvm uninstall 18
Additional Resources