Command-line interface tool for MikroORM TypeScript ORM providing database management, migrations, schema operations, and entity generation
—
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Pending
The risk profile of this skill
MikroORM CLI debugging and diagnostic commands for troubleshooting configuration issues, validating setup, and inspecting the CLI environment.
Comprehensive debugging command that validates and displays CLI configuration, dependencies, database connectivity, and entity discovery status.
/**
* Debug CLI configuration command
*/
command: "debug"
// No additional options beyond global optionsUsage Examples:
# Debug with default configuration
mikro-orm debug
# Debug with specific config file
mikro-orm debug --config ./orm.config.js
# Debug specific context
mikro-orm debug --context productionThe debug command provides comprehensive system information:
preferTs flag setting and implicationsentities and entitiesTs arraysThe debug command helps diagnose common issues:
# Example output for missing config
mikro-orm debug
# Output: - configuration not found (Configuration file not found...)# Example output for connection failure
mikro-orm debug
# Output: - database connection failed (Connection refused)# Example output for missing entity files
mikro-orm debug
# Output: - ./src/entities/*.ts (not found)The debug command performs these validation steps:
/**
* Internal path validation method
*/
private static async checkPaths(
paths: string[],
failedColor: 'red' | 'yellow',
baseDir?: string
): Promise<void>;This method:
The debug command tests database connectivity by:
The debug command supports:
--config: Path to ORM configuration file(s)--contextName / --context: Configuration context nameDebug output uses color coding:
# Issue: Configuration file not found
# Solution: Check config file paths or specify explicitly
mikro-orm debug --config ./custom-config.js# Issue: Cannot connect to database
# Check: Database server running, credentials correct, network accessible
# Verify: Connection string format and database existence# Issue: ts-node not working properly
# Check: TypeScript and ts-node installation
# Verify: tsconfig.json configuration# Issue: Entities not found
# Check: Entity file paths in configuration
# Verify: Files exist at specified locations
# Confirm: Entity exports are correctmikro-orm debug when setting up new projectsThe debug command validates: