Installing Node.js
This guide covers installing Node.js on Windows, macOS, and Linux. Desktop and the Microsoft Store edition no longer bundle Node.js; they use the node and npm on your system directly, and OpenSpec and most Agent CLIs depend on it as well.
Version Requirements
Node.js 24 or higher is required, and 24 is also the minimum. In most cases, just install the latest LTS version. npm is installed together with Node.js, so you do not need to install it separately.
Which Installation Methods Need It
- Microsoft Store / Desktop: Required, and
nodeandnpmmust be found on the systemPATH. - Docker Compose: Not needed on the host.
Installing Node.js
Method One: Official Installer (Recommended)
- Visit the Node.js Official Website
- Download the LTS (Long Term Support) version Windows installer (
.msifile), and confirm the version is not lower than 24 - Double-click to run the installer
- Follow the installation wizard prompts to complete installation:
- Accept the license agreement
- Choose installation path (default is fine)
- Keep “Add to PATH” checked
- Click “Install” to start installation
- After installation completes, click “Finish”
Method Two: Using winget
Open PowerShell or Command Prompt and run:
winget install OpenJS.NodeJS.LTSAfter installation, reopen the terminal for changes to take effect.
Method One: Official Installer (Recommended)
- Visit the Node.js Official Website
- Download the LTS (Long Term Support) version macOS installer (
.pkgfile), and confirm the version is not lower than 24 - Double-click to run the installer
- Follow the installation wizard prompts to complete installation:
- Click “Continue”
- Accept the license agreement
- Choose installation disk
- Click “Install” and enter administrator password
- After installation completes, click “Close”
Method Two: Using Homebrew
If you have Homebrew installed, you can install Node.js via terminal:
brew install nodeHomebrew will automatically add Node.js to your PATH. If the command is not available, restart the terminal or run:
eval "$(/opt/homebrew/bin/brew shellenv)"Using NodeSource Repository (Recommended)
The Node.js in the distribution’s own repositories is usually lower than 24, so use the 24.x repository provided by NodeSource:
# Use curl to download the installation scriptcurl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -sudo apt-get install -y nodejsDo not install the distribution’s bundled version directly with sudo apt-get install nodejs npm; it most likely does not meet the minimum requirement of 24.
If you do not want to add a third-party package source, you can also use nvm or fnm described below.
Using NodeSource Repository (Recommended)
# Use curl to download the installation scriptcurl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash -sudo yum install -y nodejsThe Node.js in the distribution’s own repositories is usually lower than 24, so installing it directly is not recommended. You can also use nvm or fnm described below instead.
Using dnf Package Manager
sudo dnf install -y nodejs npmAfter installation, run node --version to confirm the version is not lower than 24. If the version in the repository is lower, use the NodeSource 24.x repository instead, or use nvm or fnm described below.
Using Version Management Tools
If you need to switch between multiple Node.js versions, you can use version management tools.
Note for Desktop Users
On macOS and Linux, tools such as nvm and fnm usually set PATH only in shell configuration files (such as .bashrc and .zshrc). Desktop launched from the Dock, the application menu, or a desktop icon does not read those files and may not find node. If you use a version management tool, launch Desktop from a terminal where node already works, or use the system-wide installation methods above instead.
nvm (Node Version Manager)
Linux/macOS
Copy the latest installation command directly from the nvm official repository README; do not use old installation script URLs.
After installation, reload your shell configuration:
source ~/.bashrc# Or for Zsh userssource ~/.zshrcWindows
On Windows, we recommend using nvm-windows:
- Download the latest
nvm-setup.exefrom nvm-windows releases - Run the installer
- Reopen Command Prompt or PowerShell
After installing nvm, you can use it to install and manage Node.js versions:
# Install Node.js 24nvm install 24
# Switch to Node.js 24nvm use 24
# Set default versionnvm alias default 24
# List installed versionsnvm listThe alias command is not available in nvm-windows; just use nvm install 24 and nvm use 24.
fnm (Fast Node Manager)
fnm is a faster and simpler Node.js version management tool built with Rust.
Linux/macOS
# Install using curlcurl -fsSL https://fnm.vercel.app/install | bash
# After installation, reload shell configurationsource ~/.bashrc# Or for Zsh userssource ~/.zshrcWindows
# Use scoopscoop install fnm
# Or use wingetwinget install Schniz.fnm# Install Node.js 24fnm install 24
# Switch to Node.js 24fnm use 24
# Set default versionfnm default 24
# List installed versionsfnm listAcceleration for Mainland China Users
If you are in Mainland China, downloading Node.js and npm packages may be slow. You can use domestic mirrors.
npm Mirror
# Temporarily use the mirror to installnpm install --registry=https://registry.npmmirror.com
# Permanently set the mirrornpm config set registry https://registry.npmmirror.com
# Verify the mirror is set successfullynpm config get registryNode.js Installer Mirror
Node.js installers also have a mirror download address: https://npmmirror.com/mirrors/node/. After visiting it, choose a version not lower than 24 to download.
Homebrew Mirror
If you use Homebrew in Mainland China, you can configure the USTC mirror for bottles:
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottlesVerifying Installation
After installation, verify that Node.js and npm are available in a newly opened terminal:
# Check the Node.js version, v24.0.0 or higher is requirednode --version
# Check the npm versionnpm --versionSuccessful output should look like:
$ node --versionv24.3.0
$ npm --version11.4.2If node --version shows a version lower than 24, reinstall using the methods above, or use a version management tool to switch to 24 or higher.
Configuring the npm Global Directory
Desktop installs managed packages such as Agent CLIs into your local npm global directory. If the global directory is in a location that requires administrator privileges, you may see an EACCES permission error during installation. It is recommended to move the global directory into your user directory instead of changing the permissions of system directories:
mkdir -p ~/.npm-globalnpm config set prefix ~/.npm-globalThen add ~/.npm-global/bin (on Windows, the npm global directory itself) to the system PATH, and restart your terminal and Desktop. When you use nvm or fnm, the global directory is already under your user directory, so this step is not needed.
Troubleshooting
Windows Issues
If the node or npm command is not available after installation:
- Restart Command Prompt or PowerShell
- If still not available, manually add Node.js to PATH:
- Search for “Environment Variables” and open “Edit system environment variables”
- Click “Environment Variables”
- Find “Path” in “System variables” and click “Edit”
- Add Node.js installation path (default:
C:\Program Files\nodejs\) - Click “OK” to save changes
- Fully quit and restart Desktop
If you encounter execution policy errors when using nvm or npm scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUsermacOS Issues
If you encounter permission errors when installing global npm packages, see Configuring the npm Global Directory above, or use nvm / fnm instead.
If the command is not available after installation, restart the terminal and confirm that the directory containing Node.js (usually /usr/local/bin or /opt/homebrew/bin) is in PATH.
Linux Issues
If you encounter permission errors when installing global npm packages, see Configuring the npm Global Directory above, or use nvm / fnm instead of installing global packages with sudo.
If the Node.js version installed via the system package manager is lower than 24:
- Use the NodeSource 24.x repository (see above)
- Or use a version management tool (nvm / fnm)
Checking Environment
If verification fails, check the following:
# Check if Node.js is in PATHwhere node
# Check installation pathGet-Command node# Check if Node.js is in PATHwhich node
# Check installation pathls -l $(which node)# Check if Node.js is in PATHwhich node
# Check installation pathls -l $(which node)Next Steps
After Node.js installation is complete, you can continue with the following steps:
Need More Help?
If you encounter issues not covered here:
- Visit the Node.js Official Documentation
- See How Desktop Uses Your Node Environment
- Review the HagiCode Product Overview for current product and tooling context
HagiCode
HagiCode is an agentic coding workspace. OpenSpec workflows plan the change, multi-agent execution carries it out, and Hero Dungeon makes the long run visible, so ideas become shipped software.
Turn ideas into polished, usable software with a smarter, faster, and more enjoyable agentic coding workflow.
- SmartOpenSpec workflows turn intent into an executable path, from proposal to design, tasks, and a shipped change.
- EfficientMulti-agent execution keeps research, implementation, and review moving in parallel, across several repositories and the Agent CLIs you already use.
- FunHero Dungeon turns long coding sessions into a visible, collaborative adventure with heroes, progress, and achievements.
HagiCode at a glance

The workbench: every session on one kanban board. 
A proposal moves from created to drafted, reviewed, executed, and archived. 
Hero Dungeon: heroes run the work while you follow progress, levels, and story.
Download for Windows
Share HagiCode
Ecosystem Sites
Quick Links
Community
© 2026 HagiCode | Powered By hagilight-starlight@0.9.2 | Branch: main | Commit: b74d888 | Built: