Migration Guide: Upgrade from Node.js 20 to Node.js 22 #1537
MickLesk
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This guide explains how to remove the Node.js 20 repository and upgrade to Node.js 22.
Step 1: Remove the Node.js 20 Repository
To remove the old Node.js 20 repository, follow these steps:
Step 2: Add the Node.js 22 Repository
To set up the Node.js 22 repository, follow these steps:
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
Step 3: Update the Package List
Run the following command to update the package list:
Step 4: Install Node.js 22
Install the latest version of Node.js 22:
Step 5: Verify the Installation
Check that the installation was successful:
You should see a version starting with
v22.x.x
.You're done! You have successfully migrated to Node.js 22.
Optionally: Update pnpm / yarn with npm
Beta Was this translation helpful? Give feedback.
All reactions