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:Installation Methods
- From GitHub (Recommended)
- Using npx
The recommended way to install Quartz is to fork and clone the repository:
Fork the Repository
Go to https://github.com/jackyzha0/quartz and fork the repository to your GitHub account.
Install Dependencies
Install the required npm packages:This will install all dependencies listed in
package.json, including:- Build tools (esbuild, TypeScript)
- Content processors (remark, rehype plugins)
- UI libraries (Preact, D3.js)
- CLI tools (@clack/prompts, yargs)
Package Information
Quartz uses the following package configuration:Available Scripts
After installation, you have access to these npm scripts:| Script | Command | Description |
|---|---|---|
| quartz | npm run quartz | Run Quartz CLI commands |
| docs | npm run docs | Build and serve the docs directory |
| check | npm run check | Run TypeScript and Prettier checks |
| format | npm run format | Format code with Prettier |
| test | npm run test | Run tests |
Troubleshooting
Node.js version too old
Node.js version too old
If you see an error about Node.js version, you need to upgrade:
npm version too old
npm version too old
Update npm to the latest version:
Installation fails with permission errors
Installation fails with permission errors
On Unix systems, you may need to use sudo or fix npm permissions:
Module not found errors
Module not found errors
Try clearing npm cache and reinstalling:
Next Steps
Quick Start Guide
Continue to the Quick Start guide to create your first Quartz site