Skip to main content

Prerequisites

Before installing Quartz, ensure you have the following installed on your system:

Node.js

Version 22 or higher required

npm

Version 10.9.2 or higher required
Check your versions by running node --version and npm --version in your terminal.

Verify Prerequisites

Run these commands to check if you meet the requirements:
node --version
# Should output v22.x.x or higher

npm --version
# Should output 10.9.2 or higher

Installation Methods

Package Information

Quartz uses the following package configuration:
{
  "name": "@jackyzha0/quartz",
  "description": "🌱 publish your digital garden and notes as a website",
  "version": "4.5.2",
  "type": "module",
  "license": "MIT",
  "engines": {
    "npm": ">=10.9.2",
    "node": ">=22"
  }
}

Available Scripts

After installation, you have access to these npm scripts:
ScriptCommandDescription
quartznpm run quartzRun Quartz CLI commands
docsnpm run docsBuild and serve the docs directory
checknpm run checkRun TypeScript and Prettier checks
formatnpm run formatFormat code with Prettier
testnpm run testRun tests

Troubleshooting

If you see an error about Node.js version, you need to upgrade:
# Using nvm (recommended)
nvm install 22
nvm use 22

# Or download from nodejs.org
# Visit: https://nodejs.org/
Update npm to the latest version:
npm install -g npm@latest
On Unix systems, you may need to use sudo or fix npm permissions:
# Option 1: Use sudo (not recommended)
sudo npm install

# Option 2: Fix npm permissions (recommended)
# Follow: https://docs.npmjs.com/resolving-eacces-permissions-errors
Try clearing npm cache and reinstalling:
rm -rf node_modules package-lock.json
npm cache clean --force
npm install

Next Steps

Quick Start Guide

Continue to the Quick Start guide to create your first Quartz site

Build docs developers (and LLMs) love