Troubleshooting
Common issues and solutions when using DocBox
This guide covers common issues you might encounter when using DocBox and their solutions.
ðĻ Common Errors
"Output directory does not exist"
Error Message:
The output directory [/path/to/docs] does not existCause: 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:
// 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:
--sourceand--mappingtogetherOne or more
--mappings:<name>=<path>optionsJSON array via
--source
"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:
ð Metadata Issues
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:
Increase JVM heap size
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
Run in smaller batches
ðĶĪ BoxLang-Specific Issues
BoxLang Module Not Loading
Problem: Module loads but CLI command errors out.
Cause: Module registration issue or conflicts.
Solution:
Metadata Format Differences
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:
ð§ Debug Tips
Enable Verbose Logging
Add debugging output to your generation script:
Check Component Metadata
Verify your component metadata is readable:
Validate Output Directory Permissions
Ensure DocBox can write to the output directory:
ð Getting Help
If you're still experiencing issues:
Check Documentation: docbox.ortusbooks.com
Search Issues: Jira Issue Tracker
Community Forums: Ortus Community
CFML Slack: #box-products channel at cfml-slack.herokuapp.com
Professional Support: Ortus Solutions
ð Reporting Bugs
When reporting issues, please include:
DocBox version (
box info docboxorboxlang module:docbox --version)CFML engine and version
Operating system
Complete error message and stack trace
Minimal code example to reproduce
Expected vs actual behavior
Last updated
Was this helpful?