Reference - https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04
There are a few ways you can install Node.js
brew
, snap
etcnvm
(Node Version Manager)NVM is a cli
(Command line interface) that lets you install/upgrade the version of Node.js you have locally.
Step 1 - Install Node version manager
curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh> | bash
Step 2 - Install Node
nvm install v22
Try running node