Skip to content

Error Reference

Cause: Configuration file contains invalid settings or missing required fields.

How to fix:

  • Verify all required configuration properties are present
  • Check property names match the expected schema
  • Ensure values are of correct types (string, boolean, array)
  • Compare with working configuration examples

Cause: Configuration file does not exist at the specified or default path.

How to fix:

  • Create an ioc.config.json file in your project root
  • Use --config flag to specify a different config file path
  • Verify the file path is correct and accessible

Cause: Configuration file contains invalid JSON syntax.

How to fix:

  • Check for missing commas, brackets, or quotes
  • Validate JSON syntax using a JSON validator
  • Remove trailing commas and ensure proper escaping
  • Use a JSON formatter to identify syntax issues

Cause: Configuration values fail validation rules (invalid paths, patterns, etc.).

How to fix:

  • Ensure source directory paths exist
  • Verify interface patterns are valid regex
  • Check exclude patterns use proper glob syntax
  • Validate module configurations are properly structured

Cause: Specified source directory does not exist on the filesystem.

How to fix:

  • Create the missing source directory
  • Fix the --source flag path or config sourceDir property
  • Verify the path is relative to the current working directory
  • Check for typos in the directory name

Cause: Source directory exists but cannot be read due to permission restrictions.

How to fix:

  • Fix directory permissions using chmod
  • Ensure the user has read access to the directory
  • Check parent directory permissions
  • Run with appropriate user privileges

Cause: Source directory contains no TypeScript files to analyze.

How to fix:

  • Add TypeScript files with classes implementing interfaces
  • Check exclude patterns aren’t filtering out all files
  • Verify file extensions are .ts or .tsx
  • Ensure files contain exportable classes

Cause: Code analysis process encountered an error during parsing or processing.

How to fix:

  • Check TypeScript syntax errors in source files
  • Verify all imports are resolvable
  • Fix compilation errors in the codebase
  • Ensure TypeScript version compatibility

Cause: No classes implementing interfaces or extending abstract classes found in the source directory.

How to fix:

  • Add classes that implement interfaces matching the pattern or extend abstract classes
  • Verify interface pattern regex is correct
  • Check that classes are properly exported
  • Ensure interface implementations are explicit
  • Ensure abstract classes are properly declared with “abstract” keyword

Cause: Circular dependency detected between classes or modules in the dependency graph.

How to fix:

For class-level circular dependencies:

  • Identify the circular dependency chain in the error message
  • Refactor classes to remove circular dependencies
  • Use interfaces to break dependency cycles
  • Consider using factory pattern or lazy loading

For module-level circular dependencies:

  • Review module boundaries and dependencies
  • Refactor to ensure modules form a directed acyclic graph (DAG)
  • Consider merging tightly coupled modules
  • Move shared dependencies to a separate common module

IOC_1203 - DUPLICATE_INTERFACE_IMPLEMENTATION

Section titled “IOC_1203 - DUPLICATE_INTERFACE_IMPLEMENTATION”

Cause: Multiple classes implement the same interface, causing ambiguity.

How to fix:

  • Use different interface names for different implementations
  • Configure module-specific bindings to separate implementations
  • Use qualifiers to distinguish implementations
  • Ensure only one class implements each interface

IOC_1204 - DUPLICATE_ABSTRACT_CLASS_EXTENSION

Section titled “IOC_1204 - DUPLICATE_ABSTRACT_CLASS_EXTENSION”

Cause: Multiple classes extend the same abstract class, causing ambiguity.

How to fix:

  • Use composition instead of inheritance where possible
  • Create separate abstract classes for different implementations
  • Consider using interfaces with default implementations
  • Ensure only one class extends each abstract class

Cause: Interface pattern glob is malformed or invalid.

How to fix:

  • Fix the glob pattern syntax in --interface flag or interface config property
  • Use valid glob patterns like I*.ts for files starting with ‘I’
  • Test patterns with a glob testing tool
  • Check pattern documentation for valid syntax

Cause: Container generation process failed due to analysis or template issues.

How to fix:

  • Review and fix analysis errors first
  • Check that all dependencies are resolvable
  • Verify template compatibility
  • Ensure output directory is writable

Cause: Cannot write to the specified output file location.

How to fix:

  • Check output directory exists and is writable
  • Verify file permissions allow writing
  • Ensure sufficient disk space
  • Check if file is locked by another process

Cause: Code template processing failed during generation.

How to fix:

  • Report this as a bug with reproduction steps
  • Check for unusual class or interface names
  • Verify TypeScript syntax in source files
  • Try with a minimal example to isolate the issue

Cause: Module configuration structure is malformed or invalid.

How to fix:

  • Check modules config follows {"ModuleName": ["pattern/**"]} format
  • Ensure module names are valid identifiers
  • Verify patterns array contains valid glob patterns
  • Remove duplicate or conflicting module definitions

Cause: Module file pattern uses invalid glob syntax.

How to fix:

  • Use valid glob patterns like user/**, *.service.ts
  • Test patterns with glob testing tools
  • Avoid invalid characters in patterns
  • Use forward slashes for path separators

Cause: Multiple modules use the same or overlapping file patterns.

How to fix:

  • Use unique, non-overlapping patterns for each module
  • Make patterns more specific to avoid conflicts
  • Review module boundaries and reorganize if needed
  • Use exclusion patterns to refine module scope

Cause: Required file does not exist at the expected location.

How to fix:

  • Verify the file path exists
  • Check for typos in file names
  • Ensure file hasn’t been moved or deleted
  • Use absolute paths if relative paths fail

Cause: Cannot read file due to system error or permissions.

How to fix:

  • Check file permissions allow reading
  • Verify file is not corrupted
  • Ensure file is not locked by another process
  • Check disk health and available space

Cause: Cannot write file due to system error or permissions.

How to fix:

  • Check write permissions on target directory
  • Ensure sufficient disk space available
  • Verify file is not read-only or locked
  • Check parent directory permissions

Cause: Insufficient permissions for file or directory operation.

How to fix:

  • Fix file/directory permissions using chmod
  • Run with appropriate user privileges
  • Check ownership of files and directories
  • Ensure parent directories are accessible

Cause: General validation failure for input data or configuration.

How to fix:

  • Check input data format matches expected structure
  • Verify all required fields are provided
  • Ensure data types match validation rules
  • Review validation error details for specifics

Cause: Data structure does not match the expected schema.

How to fix:

  • Compare data structure with schema requirements
  • Add missing required properties
  • Remove invalid or extra properties
  • Ensure nested objects follow schema rules

Cause: Value type does not match the expected type.

How to fix:

  • Convert values to correct types (string, number, boolean)
  • Check for null or undefined values where not allowed
  • Ensure arrays contain elements of correct type
  • Validate object properties have correct types

Cause: Unexpected runtime error occurred during execution.

How to fix:

  • Check system requirements and dependencies
  • Verify Node.js version compatibility
  • Review error stack trace for specific issues
  • Ensure all required packages are installed

Cause: Unhandled error in the application.

How to fix:

  • Report this as a bug with full stack trace
  • Include steps to reproduce the error
  • Provide system information and CLI version
  • Try with minimal example to isolate issue

Cause: Application failed to initialize properly.

How to fix:

  • Check dependencies are properly installed
  • Verify environment variables if required
  • Ensure working directory is correct
  • Check for conflicting global packages

Cause: Specified renderer type is not available or supported.

How to fix:

  • Use valid renderer types (currently only ‘console’)
  • Check spelling of renderer name
  • Verify renderer is supported in current version
  • Remove custom renderer flags if unsupported

Cause: Renderer failed to process or display output.

How to fix:

  • Check output format requirements
  • Verify terminal supports required features
  • Try different output options
  • Report issue if error persists
  • LOW: Minor issues that don’t prevent operation
  • MEDIUM: Moderate issues that may affect functionality
  • HIGH: Serious issues that prevent normal operation
  • CRITICAL: Fatal errors requiring immediate attention