Troubleshooting Common Issues
This guide helps you diagnose and fix common problems when using DocuMCP for documentation deployment.
Quick Diagnostic Commands
Use these DocuMCP prompts for immediate diagnosis:
# General troubleshooting
"diagnose issues with my documentation deployment"
# Specific verification
"verify my GitHub Pages deployment and identify any problems"
# Link validation
"check all my documentation links for broken references"
# Content validation
"validate my documentation content for errors and inconsistencies"
Repository Analysis Issues
Problem: Analysis Returns Empty or Incomplete Results
Symptoms:
- Analysis shows 0 files or minimal structure
- Missing language detection
- No dependency information
Solutions:
- Check directory permissions:
ls -la /path/to/your/repository
# Ensure read permissions exist
- Verify Git repository:
git status
# Must be in a valid Git repository
- Use deeper analysis:
"analyze my repository with deep analysis to get comprehensive results"
- Check for hidden files:
# Include hidden files in analysis
ls -la
# Look for .gitignore excluding important files
Problem: Wrong Project Type Detection
Symptoms:
- Library detected as application
- Wrong primary language
- Incorrect team size estimation
Solutions:
- Provide more context:
"analyze my TypeScript library project with focus on API documentation"
- Check file extensions:
# Ensure your main files have correct extensions
find . -name "*.ts" -o -name "*.js" -o -name "*.py" | head -20
- Update package.json:
{
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"keywords": ["library", "typescript", "api"]
}
Static Site Generator Recommendation Issues
Problem: No Recommendations or Low Confidence Scores
Symptoms:
- Empty recommendation list
- All SSGs have similar low scores
- Recommendation doesn't match project needs
Solutions:
- Provide preferences:
"recommend SSG for my project with preferences for JavaScript ecosystem and feature-rich capabilities"
- Re-analyze with specific focus:
"analyze my repository focusing on documentation needs and complexity"
- Check project characteristics:
- Ensure sufficient code files exist
- Verify dependencies are in package.json/requirements.txt
- Add README with project description
Problem: Recommended SSG Doesn't Match Expectations
Symptoms:
- Hugo recommended for React project
- MkDocs suggested for JavaScript library
- Jekyll proposed for Python project
Solutions:
- Specify ecosystem preference:
"recommend SSG for my project with JavaScript ecosystem preference"
- Review analysis results:
"explain why you recommended Hugo instead of Docusaurus for my React project"
- Override with specific request:
"generate Docusaurus configuration for my project despite the Hugo recommendation"
Configuration Generation Issues
Problem: Configuration Files Not Created
Symptoms:
- No config files generated
- Empty configuration
- Missing dependencies
Solutions:
- Check output path:
# Ensure output path exists and is writable
mkdir -p ./docs
chmod 755 ./docs
- Specify absolute path:
"generate Hugo configuration files at /full/path/to/project"
- Check project name format:
# Avoid special characters in project names
"generate config for project 'My-Simple-Docs' not 'My Project (v2.0)'"
Problem: Invalid Configuration Generated
Symptoms:
- Build fails with config errors
- Missing required fields
- Wrong file format
Solutions:
- Validate generated config:
# For Docusaurus
npm run docusaurus --version
# For Hugo
hugo version && hugo config
# For MkDocs
mkdocs --version && mkdocs build --strict
- Regenerate with project details:
"generate detailed Hugo configuration with custom theme and GitHub integration"
- Fix common issues:
Docusaurus baseUrl fix:
// Fix in docusaurus.config.js
const config = {
baseUrl: "/your-repo-name/", // Must match repository name
url: "https://yourusername.github.io",
};
Hugo baseURL fix:
# Fix in config.yml
baseURL: "https://yourusername.github.io/your-repo-name/"
Documentation Structure Issues
Problem: Diataxis Structure Not Created
Symptoms:
- Missing directories
- Empty folders
- No example content
Solutions:
- Check path permissions:
ls -ld /path/to/docs
# Ensure write permissions
- Use absolute path:
"set up Diataxis structure at /absolute/path/to/docs"
- Force recreation:
"recreate documentation structure with examples for my SSG"
Problem: Content Population Fails
Symptoms:
- Empty documentation files
- Generic content only
- Missing project-specific information
Solutions:
- Provide analysis context:
"populate documentation using analysis ID analysis_abc123 with comprehensive content"
- Specify technology focus:
"populate docs focusing on TypeScript, React, and API documentation"
- Check source code structure:
# Ensure code has discoverable patterns
find . -name "*.ts" -exec grep -l "export" {} \;
GitHub Pages Deployment Issues
Problem: Deployment Workflow Fails
Symptoms:
- GitHub Actions shows red X
- Build fails with errors
- Deployment never completes
Solutions:
- Check workflow logs:
- Go to Actions tab in GitHub
- Click on failed workflow
- Review step-by-step logs
- Common fixes:
Node.js version mismatch:
# Fix in .github/workflows/deploy.yml
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20" # Match your local version
Missing dependencies:
# Ensure all dependencies in package.json
{
"dependencies": {
"@docusaurus/core": "^3.0.0",
"@docusaurus/preset-classic": "^3.0.0"
}
}
Build command issues:
# Fix build command
- name: Build
run: npm run build # Ensure this command exists in package.json
Problem: Site Shows 404 Error
Symptoms:
- GitHub Pages URL returns 404
- Site deployed but not accessible
- Some pages work, others don't
Solutions:
- Check GitHub Pages settings:
- Repository Settings > Pages
- Source should be "GitHub Actions"
- Custom domain configured correctly (if used)
- Fix baseURL configuration:
Docusaurus:
const config = {
baseUrl: "/repository-name/", // Must match your repo name exactly
url: "https://username.github.io",
};
Hugo:
baseURL: "https://username.github.io/repository-name/"
MkDocs:
site_url: "https://username.github.io/repository-name/"
- Check file naming:
# Ensure index.html or index.md exists
ls docs/index.*
Problem: Assets Not Loading (CSS/JS/Images)
Symptoms:
- Site loads but no styling
- Images show as broken
- JavaScript functionality missing
Solutions:
- Check asset paths:
// Use relative paths
<img src="./images/logo.png" /> // Good
<img src="/images/logo.png" /> // May fail
- Configure public path:
Docusaurus:
const config = {
baseUrl: "/repo-name/",
staticDirectories: ["static"],
};
Hugo:
# In config.yml
baseURL: "https://username.github.io/repo-name/"
canonifyURLs: true
- Verify asset directories:
# Check assets exist in build output
ls -la build/assets/ # Docusaurus
ls -la public/css/ # Hugo
ls -la site/css/ # MkDocs