Common issues and solutions for Astrolock
Troubleshooting
Solutions to common issues when using Astrolock.
Installation Issues
Command Not Found
Problem: astrolock: command not found
Solutions:
-
You’re not in the Astrolock directory:
cd /path/to/astrolock ./bin/astrolock version -
Astrolock is not in your PATH:
# Add to PATH (Bash) echo 'export PATH="/path/to/astrolock-template/bin:$PATH"' >> ~/.bashrc source ~/.bashrc # Add to PATH (Zsh) echo 'export PATH="/path/to/astrolock-template/bin:$PATH"' >> ~/.zshrc source ~/.zshrc -
File permissions issue:
chmod +x /path/to/astrolock-template/bin/astrolock
Node Version Error
Problem: “Unsupported Node.js version” or “Requires Node >= 18”
Solution:
# Check your version
node --version
# Install Node 18 with nvm
nvm install 18
nvm use 18
# Verify
node --version # Should show v18.x.x
Yarn Not Found
Problem: yarn: command not found
Solution:
npm install -g yarn
# Verify
yarn --version
Permission Denied
Problem: EACCES: permission denied
Solution:
# Don't use sudo! Instead, configure npm properly:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
source ~/.profile
Content Issues
Content Not Showing on Site
Problem: Created content doesn’t appear on the website
Checklist:
-
Is it published?
# Check draft status astrolock list <collection> # Publish if needed astrolock publish <collection>/<slug> -
Did you rebuild?
astrolock build -
Is the media file present?
# Check if file exists ls public/audio/content/<collection>/<slug>.mp3 ls public/images/content/<collection>/<slug>.jpg -
Filename match?
- Markdown:
my-mix.md - Media:
my-mix.mp3(must match exactly!)
- Markdown:
Can’t Find My Content
Problem: Don’t know where content is located
Solution:
# List all content
astrolock list
# List specific collection
astrolock list mixes
# Find file location
find src/content -name "*my-mix*"
Content locations:
- Markdown:
src/content/<collection>/<slug>.md - Audio:
public/audio/content/<collection>/<slug>.mp3 - Images:
public/images/content/<collection>/<slug>.jpg - Video:
public/video/content/<collection>/<slug>.mp4
Media File Not Loading
Problem: Audio/image/video doesn’t play or show
Solutions:
-
Check file exists:
ls -lh public/audio/content/mixes/my-mix.mp3 -
Check filename matches:
- Markdown slug:
my-mix.md - Media file:
my-mix.mp3 - They must match exactly (case-sensitive!)
- Markdown slug:
-
Check file format:
# Verify file type file public/audio/content/mixes/my-mix.mp3 -
Check file size:
# If file is 0 bytes or corrupt ls -lh public/audio/content/mixes/my-mix.mp3
Categories or Tags Not Showing
Problem: Categories/tags don’t appear on site
Solution:
Check your frontmatter syntax:
# ✅ Correct - Use YAML list format
categories:
- house
- techno
tags:
- vinyl
- 2025
# ❌ Wrong - Don't use comma-separated strings
categories: house, techno
tags: vinyl, 2025
Build Issues
Build Fails
Problem: astrolock build fails with errors
Common causes:
-
Invalid YAML in frontmatter: Check your content files for YAML syntax errors in the frontmatter. Try building to see specific validation errors:
astrolock build -
Missing collections:
# Check config cat .astrolock/astrolock.yaml -
Broken links in markdown:
- Check for
[text](broken-link.md) - Fix or remove broken links
- Check for
-
Missing dependencies:
yarn install
Port Already in Use
Problem: “Port 4321 is already in use”
Solutions:
-
Kill existing process:
# Find process using port 4321 lsof -i :4321 # Kill it (replace PID with actual number) kill -9 <PID> -
Use different port (coming soon):
astrolock write --port 3000
Out of Memory
Problem: “JavaScript heap out of memory”
Solution:
# Increase Node memory limit
export NODE_OPTIONS="--max-old-space-size=4096"
astrolock build
Configuration Issues
Invalid Configuration
Problem: “Invalid configuration” or YAML parsing errors
Solutions:
-
Validate YAML syntax:
# Use yq or yamllint yq eval .astrolock/astrolock.yaml # Or online validator # Copy/paste to https://www.yamllint.com/ -
Common YAML mistakes:
# ❌ Wrong indentation collections: mixes: displayName: "Mixes" # ✅ Correct indentation (2 spaces) collections: mixes: displayName: "Mixes" # ❌ Missing quotes for special characters title: My Site: The Best # ✅ Use quotes title: "My Site: The Best" -
Reset to defaults:
# Backup current config cp .astrolock/astrolock.yaml .astrolock/astrolock.yaml.backup # Reinitialize astrolock init
Collection Not Found
Problem: “Collection ‘mixes’ not found”
Solution:
-
Check collection exists:
cat .astrolock/astrolock.yaml | grep -A 5 "collections:" -
Add missing collection:
collections: mixes: displayName: "DJ Mixes" contentType: "audio" defaults: contentExtension: "mp3" -
Restart dev server:
# Stop with Ctrl+C astrolock write
Import Issues
Rekordbox Import Fails
Problem: astrolock import rekordbox doesn’t work
Solutions:
-
Check prerequisites:
# Verify lame and ffmpeg installed which lame which ffmpeg # Install if missing (macOS) brew install lame ffmpeg -
Check import folder:
# Verify WAV files exist ls ~/Rekordbox/Recordings/*.wav -
Check CUE files:
- Must have same name as WAV
my-mix.wav→my-mix.cue
-
Configuration:
# Check config cat .astrolock/rekordbox.yaml
Slow Encoding
Problem: MP3 encoding takes very long
Expected: A 60-minute mix takes 2-5 minutes to encode at 320kbps.
If slower:
- Check CPU usage
- Close other programs
- Use faster storage (SSD vs HDD)
Deployment Issues
AWS Deploy Fails
Problem: astrolock deploy fails
Solutions:
-
Check AWS credentials:
aws sts get-caller-identity --profile <profile-name> -
Check deployment config:
# In .astrolock/astrolock.yaml deploy: targets: production: platform: "aws" aws: profile: "your-profile" bucket: "your-bucket" region: "us-east-1" -
Build first:
astrolock build astrolock deploy production --execute -
Check bucket exists:
aws s3 ls s3://your-bucket --profile your-profile
CloudFront Not Invalidating
Problem: Changes don’t appear after deploy
Solution:
# Manual CloudFront invalidation
aws cloudfront create-invalidation \
--distribution-id E123ABC \
--paths "/*" \
--profile your-profile
Performance Issues
Slow Dev Server
Problem: astrolock write is slow to start or reload
Solutions:
-
Clear cache:
rm -rf .astro node_modules/.cache yarn install -
Reduce content:
- Unpublish old drafts
- Remove unused media files
-
Check system resources:
- Close other applications
- Check disk space:
df -h - Check memory:
free -h(Linux) or Activity Monitor (macOS)
Slow Build Time
Problem: astrolock build takes too long
Solutions:
-
Optimize images:
# Compress images before adding # macOS: use ImageOptim # Linux: use optipng or jpegoptim -
Clean build cache:
rm -rf dist .astro astrolock build -
Check content size:
# Count content files find src/content -type f | wc -l # Check media file sizes du -sh public/*
Git Issues
Accidentally Deleted Content
Problem: Deleted content file by mistake
Solution:
# Restore from git
git checkout HEAD src/content/mixes/my-mix.md
# Or restore from last commit
git restore src/content/mixes/my-mix.md
# See what was deleted
git log -- src/content/mixes/my-mix.md
Large Files in Git
Problem: Git repository is huge
Solution:
# Exclude media files from git
echo "public/audio/" >> .gitignore
echo "public/images/" >> .gitignore
echo "public/video/" >> .gitignore
echo "dist/" >> .gitignore
# Remove already committed files
git rm --cached -r public/audio/
git commit -m "Remove media files from git"
Error Messages
”Cannot find module”
Problem: Error: Cannot find module 'some-package'
Solution:
# Reinstall dependencies
rm -rf node_modules yarn.lock
yarn install
“Port already in use”
Problem: Error: listen EADDRINUSE: address already in use :::4321
Solution:
# Find and kill process
lsof -i :4321
kill -9 <PID>
“Disk quota exceeded”
Problem: ENOSPC: no space left on device
Solution:
# Check disk space
df -h
# Clean up
astrolock clean
rm -rf dist node_modules/.cache
Getting More Help
Diagnostic Information
When reporting issues, include:
# System info
astrolock version
node --version
yarn --version
uname -a
# Error output
astrolock build 2>&1 | tee build-error.log
Where to Get Help
- Documentation: User Guide
- Command Help:
astrolock --help - GitHub Issues: Report bugs or ask questions
- Community: (Coming soon)
Before Reporting an Issue
- ✅ Check this troubleshooting guide
- ✅ Search existing GitHub issues
- ✅ Try with a clean install
- ✅ Include diagnostic information
- ✅ Provide steps to reproduce
See also: