Languages
Node.js
Installing Node.js (v20 / v22 LTS) on Ubuntu in TIDE using NodeSource or NVM
Node.js
Node.js is an open-source, cross-platform JavaScript runtime environment built on Chrome's V8 engine that executes JavaScript code outside of a web browser.
Installation
Option 1: NodeSource APT Repository (Recommended for System-Wide Install)
NodeSource provides up-to-date official Linux binaries for LTS and Current Node.js versions.
To install Node.js 22 LTS on Ubuntu:
# Update package index and install curl
sudo apt update
sudo apt install -y curl ca-certificates gnupg
# Add NodeSource repository (replace 22.x with 20.x if needed)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
# Install Node.js and npm
sudo apt install -y nodejsOption 2: Node Version Manager (NVM)
For local development where you need to switch between multiple Node.js versions:
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Load NVM into your environment
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Install latest LTS release
nvm install --ltsVerification
Verify that Node.js and NPM are installed properly:
node -v
npm -vRunning Code
Create a file named hello.js:
console.log("Hello, TIDE!");Execute it using Node.js:
node hello.js