04Install guides · 10 min
Install Node.js (LTS)
Node.js runs JavaScript outside the browser. Many AI tools (Codex via npm, Gemini CLI, web projects) need it.
Roman Urdu: Node.js bohat se AI tools aur websites ke liye zaroori ha. Hamesha LTS version lein, woh stable hota ha.
Cost: Free, open source.
Windows
- Easiest: on nodejs.org/en/download pick the LTS version (v26 on 2026-12-05) and download the Windows Installer (.msi). The page says to use the .msi for system-wide installs when possible. Click Next through the defaults.
- Or use fnm, a version manager the Node.js page recommends for Windows, in PowerShell:
$ winget install Schniz.fnm$ fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression$ fnm install --use 26 - Close and reopen the terminal before you check.
macOS
- Easiest: download the macOS Installer (.pkg) for the LTS version from nodejs.org/en/download and open it.
- Or use nvm, the default the Node.js page shows for macOS:
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash$ \. "$HOME/.nvm/nvm.sh"$ nvm install 26
Linux (Ubuntu/Debian)
- Use nvm, the default the Node.js page shows for Linux. No sudo needed (works on Fedora and WSL too):
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash$ \. "$HOME/.nvm/nvm.sh"$ nvm install 26 - Skip
sudo apt install nodejs: Ubuntu's own package is often several versions behind.
Android (Termux)
- Termux packages its own LTS build. It can lag behind nodejs.org (v24 there on 2026-12-05):
$ pkg update$ pkg install nodejs-lts
Check it worked
$ node -v$ npm -vv26.x.x (the LTS on 2026-12-05 was v26.14.0), then an npm version number
Common errors
nodeis not recognized /command not foundright after installing- Close every terminal window and open a new one.
nvm: command not found- Run
\. "$HOME/.nvm/nvm.sh"or open a new terminal. The nvm installer adds itself to your shell profile for new windows. npm install -gfails with EACCES (permission denied)- Do not use sudo. Install Node with nvm or fnm, which keep global packages in your home folder.
- PowerShell: "npm.ps1 cannot be loaded because running scripts is disabled on this system"
- Run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUseronce, then reopen PowerShell. Or usenpm.cmdinstead ofnpm. - fnm:
nodedisappears in a new PowerShell window - Add the line
fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expressionto your PowerShell profile (notepad $PROFILE), or use the .msi installer instead.
Official docs
Checked against these pages on 2026-12-05. Tools change: if a step differs, the official page wins.