This guide covers common issues you might encounter when using DocBox and their solutions.
🚨 Common Errors
"Output directory does not exist"
Error Message:
Copy The output directory [/path/to/docs] does not exist Cause: The specified output directory doesn't exist on the filesystem.
Solution: Create the output directory before running DocBox, or ensure that the path is correct. You can create it manually or programmatically:
Copy // Option 1: Create the directory first
directoryCreate ( expandPath ( "/docs" ) , true );
// Option 2: Use an existing directory
new docbox .DocBox ()
.addStrategy ( "HTML" , {
outputDir : expandPath ( "/existing/path" )
} )
.generate ( source: "/src" , mapping: "app" ); Missing Source Mappings (CLI)
Error Message:
Cause: The BoxLang CLI command wasn't provided with source directory information.
Solution: Ensure you provide either:
--source and --mapping together
One or more --mappings:<name>=<path> options
"Cannot read properties of undefined (reading 'toLowerCase')"
Cause: JavaScript error in HTML templates when filtering methods with missing properties.
Solution: This was fixed in DocBox 5.0. Update to the latest version:
Class Not Found
Error Message:
Cause: The mapping specified doesn't match the actual package structure.
Solution: Ensure your mapping matches your component path structure:
Exclusion Pattern Not Working
Problem: Files are still being documented despite exclusion pattern.
Cause: Exclusion patterns are applied to relative file paths, not absolute paths.
Solution: Use patterns that match the relative path structure:
Empty Documentation Pages
Problem: Generated docs show components but no methods/properties.
Cause: Components lack JavaDoc comments or metadata.
Solution: Add proper documentation to your components:
Generic Types Not Showing
Problem: Generic type annotations like Array<User> not appearing in docs.
Cause: Using standard @returntype instead of @doc.type.
Solution: Use the @doc.type annotation:
Implements Not Detected
Problem: Interface implementations not showing in documentation.
Cause: Engine-specific metadata format differences.
Solution: DocBox 5.0+ handles both formats automatically. If using older versions, update:
🎨 HTML/UI Issues
Dark Mode Not Persisting
Problem: Dark mode preference resets on page reload.
Cause: Browser localStorage might be disabled or cleared.
Solution:
Check browser console for localStorage errors
Enable localStorage in browser settings
Clear site data and try again
Search Not Working
Problem: Method search doesn't filter results.
Cause: JavaScript not loading or Alpine.js initialization issue.
Solution:
Check browser console for errors
Ensure you're using a modern browser (Chrome, Firefox, Edge, Safari)
Clear browser cache and reload
Check network tab for failed asset loads
Theme Not Loading
Problem: Documentation appears unstyled or broken.
Cause: Asset paths incorrect or theme not specified properly.
Solution:
🛠️ Build Issues
CLI Command Not Found
Error Message:
Cause: bx-docbox module not installed.
Solution:
Memory Issues with Large Codebases
Problem: DocBox runs out of memory when processing large projects.
Solution:
Process in smaller chunks:
Use more aggressive exclusion patterns:
Build Hangs or Takes Too Long
Problem: Documentation generation appears to hang.
Cause: Processing too many files or infinite recursion in inheritance.
Solution:
Add verbose logging to see progress
Check for circular dependencies in your code
Exclude unnecessary directories
🦤 BoxLang-Specific Issues
BoxLang Module Not Loading
Problem: Module loads but CLI command errors out.
Cause: Module registration issue or conflicts.
Solution:
Problem: Documentation differs between CFML and BoxLang engines.
Cause: BoxLang uses different metadata structure for some properties.
Solution: DocBox 5.0+ automatically handles both formats. If you're on an older version:
📊 Strategy-Specific Issues
JSON Output Empty
Problem: JSON files generated but contain no data.
Cause: Source directory or mapping incorrect.
Solution: Verify your paths and mappings:
XMI/UML Strategy Fails
Problem: XMI strategy throws errors.
Cause: Missing or invalid output file path.
Solution:
Enable Verbose Logging
Add debugging output to your generation script:
Verify your component metadata is readable:
Validate Output Directory Permissions
Ensure DocBox can write to the output directory:
If you're still experiencing issues:
📝 Reporting Bugs
When reporting issues, please include:
DocBox version (box info docbox or boxlang module:docbox --version)
Complete error message and stack trace
Minimal code example to reproduce
Expected vs actual behavior