Skip to content

Troubleshooting Quartz Publishing

Solutions for common Quartz publishing problems plus debugging tips.

  1. Quick Diagnostics
  2. Build Problems
  3. Preview Problems
  4. Publishing Problems
  5. Sync Problems
  6. Alfred Problems
  7. Debugging Checklist

Run these commands first to identify the problem:

Terminal window
# Check Quartz builds
cd ~/Developer/mementropy-quartz
npx quartz build
# Check log files
cat /tmp/quartz-publish.log
cat /tmp/quartz-preview.log
# Check git status
git status
# Check Node.js
node --version # Should be 18+
npx --version
# Check if preview server running
lsof -i :8080

Symptoms:

Error: Cannot find module '@jackyzha0/quartz'

Solution:

Terminal window
cd ~/Developer/mementropy-quartz
npm install

Symptoms:

EACCES: permission denied, mkdir '/usr/local/lib/node_modules'

Solution:

Terminal window
# Fix npm permissions
sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib/node_modules
# Or use nvm instead
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

Symptoms:

Error parsing frontmatter in content/some-file.md

Solution:

  1. Open the mentioned file
  2. Check YAML syntax:
    • Colons in values need quotes: title: "My Title: Subtitle"
    • Lists need proper indentation
    • No tabs, only spaces
# Wrong
title: My Title: With Colon
# Correct
title: "My Title: With Colon"

Problem: “Could not resolve entry module”

Section titled “Problem: “Could not resolve entry module””

Symptoms:

Could not resolve entry module (content/index.md)

Solution: Quartz needs an index.md in content root:

Terminal window
# Check if index exists
ls ~/Developer/mementropy-quartz/content/index.md
# If missing, create it
echo "---
title: Home
---
Welcome to my site." > ~/Developer/mementropy-quartz/content/index.md

Symptoms:

Error: listen EADDRINUSE: address already in use :::8080

Solution:

Terminal window
# Find process using port
lsof -i :8080
# Kill it
lsof -i :8080 | grep LISTEN | awk '{print $2}' | xargs kill -9
# Or kill all Quartz processes
pkill -f "quartz"
# Remove stale PID file
rm -f /tmp/quartz-preview.pid

Symptoms:

  • Made changes but preview doesn’t update
  • Browser shows cached version

Solution:

Terminal window
# Stop current server
pkill -f "quartz"
# Clear Quartz cache
rm -rf ~/Developer/mementropy-quartz/.quartz-cache
# Restart preview
cd ~/Developer/mementropy-quartz
npx quartz build --serve

Also try hard refresh in browser: Cmd+Shift+R

Symptoms:

  • Alfred shows triggered but nothing happens
  • No browser opens

Solution:

Terminal window
# Check log
cat /tmp/quartz-preview.log
# Try manual build
cd ~/Developer/mementropy-quartz
npx quartz build --serve

If manual build works but Alfred doesn’t, check PATH:

Terminal window
# In Alfred script, use full paths:
/usr/local/bin/npx quartz build --serve
# Find your npx path:
which npx

Problem: “Permission denied” on Script

Section titled “Problem: “Permission denied” on Script”

Symptoms:

./scripts/publish.sh: Permission denied

Solution:

Terminal window
chmod +x ~/Developer/mementropy-quartz/scripts/publish.sh

Symptoms:

fatal: could not read Password for 'https://github.com'

Solution: Switch to SSH authentication:

Terminal window
# Generate SSH key if needed
ssh-keygen -t ed25519 -C "your_email@example.com"
# Copy public key
cat ~/.ssh/id_ed25519.pub | pbcopy
# Add to GitHub: Settings → SSH Keys → New SSH Key
# Update remote URL
cd ~/Developer/mementropy-quartz
git remote set-url origin git@github.com:USERNAME/repo.git
# Test
ssh -T git@github.com

Symptoms:

  • Publish says no changes
  • But you edited files

Solution: Check if changes are in the right place:

Terminal window
cd ~/Developer/mementropy-quartz
# Check git status
git status
# Are content changes showing?
git diff content/
# If content/ is a symlink, check the actual files
ls -la content/

If using symlink, changes might be detected differently. Adjust publish.sh:

Terminal window
# In publish.sh, force-add content
git add -A content/

Symptoms:

  • Push succeeds but deployment fails
  • Red X on GitHub Actions

Solution:

  1. Visit: https://github.com/USERNAME/repo/actions
  2. Click failed run
  3. Expand failed step to see error
  4. Common fixes:
    • Check quartz.config.ts has correct baseUrl
    • Verify package.json has all dependencies
    • Check workflow file (.github/workflows/deploy.yml)

Symptoms:

  • Edit on iPad
  • Mac mini doesn’t see changes
  • Publish uses old content

Diagnostics:

Terminal window
# Check file timestamps on Mac mini
ls -lt ~/Obsidian/Ingenium/mementropy-site/ | head -5
# If timestamps are old, sync isn't working

Solutions by Sync Service:

Terminal window
# On Mac mini, open Obsidian once
# Check Settings → Sync → Status
# Should show "Synced" or sync in progress
# Can close Obsidian after sync completes
Terminal window
# Check iCloud is active
brctl status
# Restart iCloud daemon
killall bird
# Wait 30 seconds, check files again
Terminal window
# Create test file on editing device
# In Obsidian: New file → "sync-test-[date].md"
# Wait 60 seconds
# On Mac mini:
ls ~/Obsidian/Ingenium/mementropy-site/sync-test*.md

Symptoms:

  • Quartz can’t find content
  • Empty or missing pages

Solution: Verify paths match:

Terminal window
# Check where Quartz looks for content
ls -la ~/Developer/mementropy-quartz/content/
# If symlink, where does it point?
readlink ~/Developer/mementropy-quartz/content/
# Check actual vault location
ls ~/Obsidian/Ingenium/mementropy-site/

Update symlink if needed:

Terminal window
cd ~/Developer/mementropy-quartz
rm content # Remove old symlink
ln -s ~/Obsidian/Ingenium/mementropy-site content

Symptoms:

  • Type publish in Alfred
  • Nothing appears

Solutions:

  1. Check workflow enabled:

    • Alfred Preferences → Workflows
    • Verify checkmark next to workflow
  2. Rebuild Alfred cache:

    • Alfred Preferences → Advanced
    • Click “Clear Application Cache”
    • Click “Clear Keyword Cache”
    • Restart Alfred
  3. Check for conflicts:

    • Search for “publish” in workflows
    • Multiple workflows using same keyword?

Solutions:

  1. Check macOS settings:

    • System Settings → Notifications → Alfred
    • Allow Notifications: ON
    • Style: Alerts or Banners
  2. Check Focus mode:

    • Turn off Do Not Disturb
  3. Test notifications:

    Terminal window
    osascript -e 'display notification "Test" with title "Alfred"'

Solutions:

  1. iCloud method:

    • Sign out on both devices
    • Sign back in with SAME Apple ID
    • Wait 2-3 minutes for sync
  2. Local network method:

    • Both devices on same WiFi?
    • Check Mac firewall allows Alfred
  3. Restart Alfred:

    • Quit Alfred completely (Cmd+Q)
    • Relaunch from Applications

When something breaks, work through systematically:

  • npx quartz build runs without errors
  • cat /tmp/quartz-publish.log shows recent activity
  • git status shows expected changes
  • Script has execute permission: ls -la scripts/publish.sh
  • Port 8080 is free: lsof -i :8080
  • Node.js version 18+: node --version
  • Manual build works: npx quartz build --serve
  • Git can push: git push --dry-run
  • SSH works: ssh -T git@github.com
  • Changes exist: git diff content/
  • File sync working (check timestamps)
  • Alfred Remote connected (green dot)
  • Mac mini awake (check Energy settings)
  • Local workflows work before testing remote
  • GitHub Actions passed (check repo Actions tab)
  • baseUrl correct in quartz.config.ts
  • Wait 2-3 minutes after push

FileContains
/tmp/quartz-preview.logPreview server output
/tmp/quartz-publish.logPublish script output
/tmp/quartz-preview.pidPreview server process ID
Terminal window
# View logs
cat /tmp/quartz-publish.log
tail -f /tmp/quartz-preview.log # Live view
# Clear logs
rm /tmp/quartz-*.log
# Check Quartz version
cd ~/Developer/mementropy-quartz
npx quartz --version
# Full rebuild
rm -rf .quartz-cache public/
npx quartz build

If you’re still stuck:

  1. Check Quartz docs: quartz.jzhao.xyz
  2. Search issues: github.com/jackyzha0/quartz/issues
  3. Quartz Discord: Link in Quartz repo


Last updated: 2025-01-13