Skip to content

Install Node.js on Windows

Node.js is required for running tools like CodeX CLI, Gemini CLI, and CC-Switch.

  1. Visit the official Node.js website: https://nodejs.org
  2. Download the LTS (Long Term Support) version for Windows
  3. Run the installer (.msi file)
  4. Follow the installation wizard:
    • Accept the license agreement
    • Keep the default installation path
    • Ensure "Add to PATH" is checked
  5. Click Install and wait for completion

Verify Installation

Open a new PowerShell or Command Prompt window and run:

powershell
node -v
npm -v

You should see version numbers like v22.x.x and 10.x.x.

Method 2: Using fnm (Fast Node Manager)

fnm lets you install and switch between multiple Node.js versions easily.

Install fnm

powershell
winget install Schniz.fnm

Install Node.js via fnm

powershell
fnm install --lts
fnm use lts-latest
fnm default lts-latest

Add fnm to Your Shell Profile

Add the following to your PowerShell profile ($PROFILE):

powershell
fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression

Method 3: Using nvm-windows

  1. Download nvm-windows installer
  2. Run the installer
  3. Open a new terminal and install Node.js:
powershell
nvm install lts
nvm use lts

Troubleshooting

node is not recognized

  • Close and reopen your terminal after installation
  • Ensure Node.js was added to PATH during installation
  • Try restarting your computer

Permission Issues

If you encounter permission errors with npm install -g:

powershell
# Run PowerShell as Administrator
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

3xCoder — Unified AI API Endpoint