Knowledgebase
Updating Node.js on a Linux based server can be painful to say the least as the process of uninstalling Node.js can be problematic and over-complicated. Node Version Manager (NVM) brings the ability for Node.js installs to be easily managed and changed on a server or per-process basis.
Table of Contents
To install NVM run the below commands. Note that this guide uses Ubuntu, if on other Linux distributions, commands may need to be altered.
Update the servers package repository
sudo apt updateInstall NVM
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bashRestart the terminal application to register the new commands
Verify NVM has been installed
nvm -vTo install the a specific version of Node.js run the below commands. Most Weblutions products require v20.5.1, so that will be used in this guide.
Install a Node.js version
nvm install 20.5.1Optionally, set this install to be the default version of Node.js used
nvm alias default 20.5.1