Troubleshooting Quartz Publishing
Troubleshooting Quartz Publishing
Section titled “Troubleshooting Quartz Publishing”Solutions for common Quartz publishing problems plus debugging tips.
Table of Contents
Section titled “Table of Contents”- Quick Diagnostics
- Build Problems
- Preview Problems
- Publishing Problems
- Sync Problems
- Alfred Problems
- Debugging Checklist
Quick Diagnostics
Section titled “Quick Diagnostics”Run these commands first to identify the problem:
# Check Quartz buildscd ~/Developer/mementropy-quartznpx quartz build
# Check log filescat /tmp/quartz-publish.logcat /tmp/quartz-preview.log
# Check git statusgit status
# Check Node.jsnode --version # Should be 18+npx --version
# Check if preview server runninglsof -i :8080Build Problems
Section titled “Build Problems”Problem: “Cannot find module” Error
Section titled “Problem: “Cannot find module” Error”Symptoms:
Error: Cannot find module '@jackyzha0/quartz'Solution:
cd ~/Developer/mementropy-quartznpm installProblem: “EACCES permission denied”
Section titled “Problem: “EACCES permission denied””Symptoms:
EACCES: permission denied, mkdir '/usr/local/lib/node_modules'Solution:
# Fix npm permissionssudo chown -R $(whoami) ~/.npmsudo chown -R $(whoami) /usr/local/lib/node_modules
# Or use nvm insteadcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashProblem: Frontmatter Parsing Error
Section titled “Problem: Frontmatter Parsing Error”Symptoms:
Error parsing frontmatter in content/some-file.mdSolution:
- Open the mentioned file
- Check YAML syntax:
- Colons in values need quotes:
title: "My Title: Subtitle" - Lists need proper indentation
- No tabs, only spaces
- Colons in values need quotes:
# Wrongtitle: My Title: With Colon
# Correcttitle: "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:
# Check if index existsls ~/Developer/mementropy-quartz/content/index.md
# If missing, create itecho "---title: Home---
Welcome to my site." > ~/Developer/mementropy-quartz/content/index.mdPreview Problems
Section titled “Preview Problems”Problem: Port 8080 Already in Use
Section titled “Problem: Port 8080 Already in Use”Symptoms:
Error: listen EADDRINUSE: address already in use :::8080Solution:
# Find process using portlsof -i :8080
# Kill itlsof -i :8080 | grep LISTEN | awk '{print $2}' | xargs kill -9
# Or kill all Quartz processespkill -f "quartz"
# Remove stale PID filerm -f /tmp/quartz-preview.pidProblem: Preview Shows Old Content
Section titled “Problem: Preview Shows Old Content”Symptoms:
- Made changes but preview doesn’t update
- Browser shows cached version
Solution:
# Stop current serverpkill -f "quartz"
# Clear Quartz cacherm -rf ~/Developer/mementropy-quartz/.quartz-cache
# Restart previewcd ~/Developer/mementropy-quartznpx quartz build --serveAlso try hard refresh in browser: Cmd+Shift+R
Problem: Preview Command Hangs
Section titled “Problem: Preview Command Hangs”Symptoms:
- Alfred shows triggered but nothing happens
- No browser opens
Solution:
# Check logcat /tmp/quartz-preview.log
# Try manual buildcd ~/Developer/mementropy-quartznpx quartz build --serveIf manual build works but Alfred doesn’t, check PATH:
# In Alfred script, use full paths:/usr/local/bin/npx quartz build --serve
# Find your npx path:which npxPublishing Problems
Section titled “Publishing Problems”Problem: “Permission denied” on Script
Section titled “Problem: “Permission denied” on Script”Symptoms:
./scripts/publish.sh: Permission deniedSolution:
chmod +x ~/Developer/mementropy-quartz/scripts/publish.shProblem: Git Push Asks for Password
Section titled “Problem: Git Push Asks for Password”Symptoms:
fatal: could not read Password for 'https://github.com'Solution: Switch to SSH authentication:
# Generate SSH key if neededssh-keygen -t ed25519 -C "your_email@example.com"
# Copy public keycat ~/.ssh/id_ed25519.pub | pbcopy
# Add to GitHub: Settings → SSH Keys → New SSH Key
# Update remote URLcd ~/Developer/mementropy-quartzgit remote set-url origin git@github.com:USERNAME/repo.git
# Testssh -T git@github.comProblem: “Nothing to commit”
Section titled “Problem: “Nothing to commit””Symptoms:
- Publish says no changes
- But you edited files
Solution: Check if changes are in the right place:
cd ~/Developer/mementropy-quartz
# Check git statusgit status
# Are content changes showing?git diff content/
# If content/ is a symlink, check the actual filesls -la content/If using symlink, changes might be detected differently. Adjust publish.sh:
# In publish.sh, force-add contentgit add -A content/Problem: GitHub Actions Fails
Section titled “Problem: GitHub Actions Fails”Symptoms:
- Push succeeds but deployment fails
- Red X on GitHub Actions
Solution:
- Visit:
https://github.com/USERNAME/repo/actions - Click failed run
- Expand failed step to see error
- Common fixes:
- Check
quartz.config.tshas correctbaseUrl - Verify
package.jsonhas all dependencies - Check workflow file (
.github/workflows/deploy.yml)
- Check
Sync Problems
Section titled “Sync Problems”Problem: Files Not Syncing to Mac Mini
Section titled “Problem: Files Not Syncing to Mac Mini”Symptoms:
- Edit on iPad
- Mac mini doesn’t see changes
- Publish uses old content
Diagnostics:
# Check file timestamps on Mac minils -lt ~/Obsidian/Ingenium/mementropy-site/ | head -5
# If timestamps are old, sync isn't workingSolutions by Sync Service:
Obsidian Sync
Section titled “Obsidian Sync”# On Mac mini, open Obsidian once# Check Settings → Sync → Status# Should show "Synced" or sync in progress# Can close Obsidian after sync completesiCloud Drive
Section titled “iCloud Drive”# Check iCloud is activebrctl status
# Restart iCloud daemonkillall bird
# Wait 30 seconds, check files againTest Sync Manually
Section titled “Test Sync Manually”# 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*.mdProblem: Vault Path Mismatch
Section titled “Problem: Vault Path Mismatch”Symptoms:
- Quartz can’t find content
- Empty or missing pages
Solution: Verify paths match:
# Check where Quartz looks for contentls -la ~/Developer/mementropy-quartz/content/
# If symlink, where does it point?readlink ~/Developer/mementropy-quartz/content/
# Check actual vault locationls ~/Obsidian/Ingenium/mementropy-site/Update symlink if needed:
cd ~/Developer/mementropy-quartzrm content # Remove old symlinkln -s ~/Obsidian/Ingenium/mementropy-site contentAlfred Problems
Section titled “Alfred Problems”Problem: Keyword Not Recognized
Section titled “Problem: Keyword Not Recognized”Symptoms:
- Type
publishin Alfred - Nothing appears
Solutions:
-
Check workflow enabled:
- Alfred Preferences → Workflows
- Verify checkmark next to workflow
-
Rebuild Alfred cache:
- Alfred Preferences → Advanced
- Click “Clear Application Cache”
- Click “Clear Keyword Cache”
- Restart Alfred
-
Check for conflicts:
- Search for “publish” in workflows
- Multiple workflows using same keyword?
Problem: Notifications Don’t Appear
Section titled “Problem: Notifications Don’t Appear”Solutions:
-
Check macOS settings:
- System Settings → Notifications → Alfred
- Allow Notifications: ON
- Style: Alerts or Banners
-
Check Focus mode:
- Turn off Do Not Disturb
-
Test notifications:
Terminal window osascript -e 'display notification "Test" with title "Alfred"'
Problem: Alfred Remote Can’t Connect
Section titled “Problem: Alfred Remote Can’t Connect”Solutions:
-
iCloud method:
- Sign out on both devices
- Sign back in with SAME Apple ID
- Wait 2-3 minutes for sync
-
Local network method:
- Both devices on same WiFi?
- Check Mac firewall allows Alfred
-
Restart Alfred:
- Quit Alfred completely (Cmd+Q)
- Relaunch from Applications
Debugging Checklist
Section titled “Debugging Checklist”When something breaks, work through systematically:
Basic Checks
Section titled “Basic Checks”-
npx quartz buildruns without errors -
cat /tmp/quartz-publish.logshows recent activity -
git statusshows expected changes - Script has execute permission:
ls -la scripts/publish.sh
For Preview Issues
Section titled “For Preview Issues”- Port 8080 is free:
lsof -i :8080 - Node.js version 18+:
node --version - Manual build works:
npx quartz build --serve
For Publishing Issues
Section titled “For Publishing Issues”- Git can push:
git push --dry-run - SSH works:
ssh -T git@github.com - Changes exist:
git diff content/
For Remote Publishing
Section titled “For Remote Publishing”- File sync working (check timestamps)
- Alfred Remote connected (green dot)
- Mac mini awake (check Energy settings)
- Local workflows work before testing remote
For Deployment Issues
Section titled “For Deployment Issues”- GitHub Actions passed (check repo Actions tab)
-
baseUrlcorrect inquartz.config.ts - Wait 2-3 minutes after push
Log File Reference
Section titled “Log File Reference”| File | Contains |
|---|---|
/tmp/quartz-preview.log | Preview server output |
/tmp/quartz-publish.log | Publish script output |
/tmp/quartz-preview.pid | Preview server process ID |
Useful Commands
Section titled “Useful Commands”# View logscat /tmp/quartz-publish.logtail -f /tmp/quartz-preview.log # Live view
# Clear logsrm /tmp/quartz-*.log
# Check Quartz versioncd ~/Developer/mementropy-quartznpx quartz --version
# Full rebuildrm -rf .quartz-cache public/npx quartz buildGetting Help
Section titled “Getting Help”If you’re still stuck:
- Check Quartz docs: quartz.jzhao.xyz
- Search issues: github.com/jackyzha0/quartz/issues
- Quartz Discord: Link in Quartz repo
Related
Section titled “Related”- Alfred Workflows for Quartz - Setup guide
- Remote Publishing - iPhone/iPad control
Last updated: 2025-01-13