Install Node.js
Install Node.js and npm to run Mordoc and build your documentation site.
Install Node.js
Mordoc requires Node.js to build and preview your documentation. Node.js includes npm (Node Package Manager), which you'll use to install and run Mordoc.
System Requirements
- Node.js version: 18.0.0 or higher
- npm version: 9.0.0 or higher (included with Node.js)
Download Node.js
Visit the official Node.js website:
You'll see two versions available:
- LTS (Long Term Support): Recommended for most users
- Current: Latest features, less stable
Download the LTS version for maximum stability and compatibility with Mordoc.
Installation Instructions
Windows
- Download the Windows Installer (.msi) from nodejs.org
- Run the installer
- Follow the installation wizard:
- Accept the license agreement
- Choose installation location (default is fine)
- Keep default features selected
- Check "Automatically install necessary tools" if prompted
- Click "Install"
- Restart your terminal after installation
macOS
Option 1: Official Installer
- Download the macOS Installer (.pkg) from nodejs.org
- Run the installer
- Follow the installation wizard
- Restart your terminal
Option 2: Using Homebrew
brew install nodeLinux
Ubuntu/Debian:
# Using NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejsFedora/RHEL:
sudo dnf install nodejsArch Linux:
sudo pacman -S nodejs npmVerify Installation
After installation, verify that Node.js and npm are installed correctly:
node --versionExpected output: v18.x.x or higher
npm --versionExpected output: 9.x.x or higher
If the commands are not recognized, you may need to restart your terminal or add Node.js to your system PATH.
Update npm (Optional)
To update npm to the latest version:
npm install -g npm@latestTroubleshooting
Command Not Found
If you get a "command not found" error:
- Restart your terminal completely
- Verify Node.js is in your PATH:Bash
# Windows (PowerShell) $env:Path -split ';' | Select-String node # macOS/Linux echo $PATH | grep node
Permission Issues (macOS/Linux)
If you encounter permission errors when installing packages globally:
# Fix npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
source ~/.profileNext Steps
With Node.js installed, you're ready to:
- Install Git - Set up version control
- Create your first project - Start building with Mordoc

