04 [Install guides](https://logicpacks.io/install) · 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](#windows) · [macOS](#macos) · [Linux (Ubuntu/Debian)](#linux) · [Android (Termux)](#android)

## Windows

1.  Easiest: on [nodejs.org/en/download](https://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.
2.  Or use fnm, a version manager the Node.js page recommends for Windows, in PowerShell:
    
    ```sh
    winget install Schniz.fnm
    ```
    
    ```sh
    fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression
    ```
    
    ```sh
    fnm install --use 26
    ```
    
3.  Close and reopen the terminal before you check.

## macOS

1.  Easiest: download the **macOS Installer (.pkg)** for the LTS version from [nodejs.org/en/download](https://nodejs.org/en/download) and open it.
2.  Or use nvm, the default the Node.js page shows for macOS:
    
    ```sh
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash
    ```
    
    ```sh
    \. "$HOME/.nvm/nvm.sh"
    ```
    
    ```sh
    nvm install 26
    ```
    

## Linux (Ubuntu/Debian)

1.  Use nvm, the default the Node.js page shows for Linux. No sudo needed (works on Fedora and WSL too):
    
    ```sh
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash
    ```
    
    ```sh
    \. "$HOME/.nvm/nvm.sh"
    ```
    
    ```sh
    nvm install 26
    ```
    
2.  Skip `sudo apt install nodejs`: Ubuntu's own package is often several versions behind.

## Android (Termux)

1.  Termux packages its own LTS build. It can lag behind nodejs.org (v24 there on 2026-12-05):
    
    ```sh
    pkg update
    ```
    
    ```sh
    pkg install nodejs-lts
    ```
    

## Check it worked

```sh
node -v
```

```sh
npm -v
```

v26.x.x (the LTS on 2026-12-05 was v26.14.0), then an npm version number

## Common errors

`node` is not recognized / `command not found` right 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 -g` fails 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 CurrentUser` once, then reopen PowerShell. Or use `npm.cmd` instead of `npm`.

fnm: `node` disappears in a new PowerShell window

Add the line `fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression` to your PowerShell profile (`notepad $PROFILE`), or use the .msi installer instead.

## Official docs

-   [nodejs.org: Download](https://nodejs.org/en/download)
-   [nvm (Node Version Manager)](https://github.com/nvm-sh/nvm)
-   [fnm (Fast Node Manager)](https://github.com/Schniz/fnm)
-   [Termux packages: nodejs-lts](https://github.com/termux/termux-packages/tree/master/packages/nodejs-lts)

Checked against these pages on 2026-12-05. Tools change: if a step differs, the official page wins.

[Install guides : All guides](https://logicpacks.io/install) [Next : Install VS Code](https://logicpacks.io/install/vscode)

---

Canonical URL: https://logicpacks.io/install/node

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](https://logicpacks.io/llms.txt). Plain facts: [/about.md](https://logicpacks.io/about.md). Safety: [/safety.md](https://logicpacks.io/safety.md).
