Due to its integration with browsers since the advent of the World Wide Web, JavaScript has been used on the vast majority of websites created. Node.js is an asynchronous event-driven JavaScript runtime that can be used for creating executable scripts, building web servers, or doing just about anything else you would want to do with a programming language.
In this video, we use a tool called Node Version Manager (NVM) to install three different versions of Node.js on a freshly installed Ubuntu 24.04 Linux operating system. In order to install NVM, we first need to install curl, a command-line tool for making network requests across a variety of protocols, including HTTP(S).
This video covers:
00:00:00 Introduction
00:01:01 Why use NVM?
00:01:45 Take a quick tour of the NVM GitHub repo README
00:02:03 Try to execute NVM install command in terminal. Curl not installed. Install that first
00:02:52 Hit the up key twice in the terminal to retry the previous install command. It now succeeds. Close and reopen the terminal. Check install by running `nvm -v`
00:03:34 Review the support schedule of Node.js (as-of May 2024)
00:04:22 Install node 18. (As the first version installed, this becomes the default.)
00:04:43 Install node 20.
00:05:13 Install node 22
00:05:24 Demonstrate how 18 is the default version
00:06:06 How to use `nvm use` to switch between versions
00:06:25 Make node 20 the default version with `nvm alias default 20`
00:06:59 What's next?
#setup #configuration #install #linux #ubuntu #debian #deb #terminal #ubuntu24 #lts #nvm #node #nodejs #node18 #node20 #node22 #github #curl
See other related StatelessCode videos:
Codecast: Install NodeJS 14 Ubuntu 20.04 (2021) • Codecast: Install NodeJS 14 Ubuntu 20.04
Codecast: Install NVM and Yarn in Ubuntu 20.04 (2021) • Codecast: Install NodeJS 14 Ubuntu 20.04
Featured Playlist:
Getting Started with Rails 7 Playlist • Getting Started with Rails 7
Resources that we relied upon for this solution:
Node.js main website https://nodejs.org
Node.js releases page https://nodejs.org/en/about/previous-...
Node.js package manager instructions (you can choose your OS and preferred method) https://nodejs.org/en/download/packag...
NVM GitHub Repo https://github.com/nvm-sh/nvm
Curl website https://curl.se/
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.