Node.js Setup
chro requires Node.js 18 or later as a prerequisite for running AI coding tools like Claude Code and OpenAI Codex.
Check Existing Installation
Section titled “Check Existing Installation”First, check if Node.js is already installed:
node -vnpm -vIf both commands return version numbers (Node.js 18+), you’re ready to proceed. Otherwise, follow the installation instructions below.
Option 1: Homebrew (Recommended)
Section titled “Option 1: Homebrew (Recommended)”Homebrew is the most popular package manager for macOS.
1. Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"2. Install Node.js:
brew install node@223. Verify installation:
node -v # Should show v22.x.xnpm -v # Should show 10.x.x or laterOption 2: fnm (Fast Node Manager)
Section titled “Option 2: fnm (Fast Node Manager)”fnm allows you to manage multiple Node.js versions easily.
1. Install fnm via Homebrew:
brew install fnm2. Add fnm to your shell (add to ~/.zshrc or ~/.bashrc):
eval "$(fnm env --use-on-cd)"3. Restart your terminal or run:
source ~/.zshrc # or source ~/.bashrc4. Install and use Node.js 22:
fnm install 22fnm use 22fnm default 22Option 3: Official Installer
Section titled “Option 3: Official Installer”Download the macOS installer from the official Node.js website.
- Download the LTS version (recommended) or Current version
- Open the
.pkgfile and follow the installation wizard - Restart your terminal after installation
Windows
Section titled “Windows”Option 1: winget (Recommended)
Section titled “Option 1: winget (Recommended)”winget is the official Windows Package Manager, pre-installed on Windows 11 and available for Windows 10.
1. Open PowerShell or Terminal
2. Install Node.js:
winget install OpenJS.NodeJS.LTSNote: If prompted by UAC (User Account Control), click “Yes” to allow the installation.
3. Restart your terminal (important!)
4. Verify installation:
node -vnpm -vOption 2: Official Installer
Section titled “Option 2: Official Installer”Download the Windows installer from the official Node.js website.
- Download the LTS version
.msiinstaller - Run the installer and follow the wizard
- Ensure “Add to PATH” is checked during installation
- Restart your terminal after installation
Option 3: nvm-windows
Section titled “Option 3: nvm-windows”nvm-windows lets you manage multiple Node.js versions on Windows.
1. Download nvm-windows:
Download the latest installer from the releases page.
2. Install nvm-windows:
Run the installer and follow the prompts.
3. Install and use Node.js:
nvm install 22nvm use 22Verify Installation
Section titled “Verify Installation”After installation, verify everything is working:
# Check Node.js version (should be 18+)node -v
# Check npm versionnpm -v
# Test npm by checking global packages locationnpm root -gTroubleshooting
Section titled “Troubleshooting””command not found: node” (macOS/Linux)
Section titled “”command not found: node” (macOS/Linux)”- Ensure Node.js is in your PATH
- Restart your terminal
- If using fnm, make sure you’ve added the eval line to your shell config
”node is not recognized” (Windows)
Section titled “”node is not recognized” (Windows)”- Restart your terminal/PowerShell
- Check if Node.js is in your system PATH:
- Open System Properties > Advanced > Environment Variables
- Look for Node.js in the
Pathvariable
npm permission errors (macOS/Linux)
Section titled “npm permission errors (macOS/Linux)”If you see EACCES permission errors when installing global packages:
# Create a directory for global packagesmkdir ~/.npm-global
# Configure npm to use itnpm config set prefix '~/.npm-global'
# Add to PATH in ~/.zshrc or ~/.bashrcexport PATH=~/.npm-global/bin:$PATHProxy issues (Corporate networks)
Section titled “Proxy issues (Corporate networks)”If you’re behind a corporate proxy:
npm config set proxy http://proxy.company.com:8080npm config set https-proxy http://proxy.company.com:8080Next Steps
Section titled “Next Steps”Once Node.js is installed, proceed to:
- Git & GitHub Setup - Set up version control
- AI Coding Tools Setup - Install Claude Code or OpenAI Codex