Skip to content
Arxo Arxo

Troubleshooting

This guide covers common issues you might encounter when using Arxo.

Arxo is distributed as a closed-source pre-built binary. You do not need Rust to run it. Download the latest release for your platform from GitHub Releases and add the arxo binary to your PATH. See Installation for details.


Symptoms:

  • “0 files analyzed”
  • Empty import graph
  • No metrics computed

Causes & Solutions:

  1. Wrong directory:

    Terminal window
    # Check current directory
    pwd
    # Specify correct path
    arxo analyze --path /path/to/project
  2. Excluded by patterns:

    # Check .arxo.yaml exclude patterns
    import_graph:
    exclude:
    - "**/*" # ❌ Excludes everything!

    Remove or fix overly broad exclusions.

  3. Unsupported file types: Arxo only parses:

    • .ts, .tsx, .js, .jsx, .mjs
    • .py
    • .rs
    • .java
    • .kt, .kts
    • .go

    Check you have source files in these languages.

  4. Files in node_modules:

    # Ensure node_modules is excluded
    import_graph:
    exclude:
    - "**/node_modules/**"

Symptoms: Analysis takes >5 minutes on small projects

Solutions:

  1. Use quick mode:

    Terminal window
    arxo analyze --quick
  2. Exclude test/build directories:

    import_graph:
    exclude:
    - "**/test/**"
    - "**/tests/**"
    - "**/dist/**"
    - "**/build/**"
    - "**/*.test.ts"
    - "**/*.spec.ts"
  3. Limit languages:

    import_graph:
    languages:
    - typescript # Only analyze TypeScript
  4. Use caching:

    Terminal window
    # Ensure caching is enabled (default)
    arxo analyze # First run: slow
    arxo analyze # Subsequent: fast
  5. Clear corrupted cache:

    Terminal window
    arxo cache clear

Symptoms: Process killed, OOM errors

Solutions:

  1. Limit graph size:

    import_graph:
    max_nodes: 5000
    max_edges: 20000
  2. Exclude large dependencies:

    import_graph:
    exclude:
    - "**/node_modules/**"
    - "**/vendor/**"
  3. Use file-level grouping (less memory than folder grouping):

    import_graph:
    group_by: file
  4. Analyze in parts:

    Terminal window
    # Analyze frontend separately
    arxo analyze --path ./frontend
    # Analyze backend separately
    arxo analyze --path ./backend

Error: “Failed to parse file: src/example.ts”

Causes & Solutions:

  1. Invalid syntax: Fix syntax errors in your source files:

    Terminal window
    # Check with native tools
    tsc --noEmit # TypeScript
    python -m py_compile file.py # Python
    cargo check # Rust
  2. Unsupported syntax: Some bleeding-edge language features might not be supported yet.

    Workaround: Exclude problematic files:

    import_graph:
    exclude:
    - "**/problematic-file.ts"
  3. Encoding issues: Ensure files are UTF-8 encoded:

    Terminal window
    file -I src/example.ts
    # Should show: charset=utf-8

Symptoms: Policy violations that seem incorrect

Solutions:

  1. Check grouping: File-level grouping might show false cycles. Try folder grouping:

    import_graph:
    group_by: folder
    group_depth: 2
  2. Inspect actual violations:

    Terminal window
    # Get detailed JSON report
    arxo analyze --format json --output report.json
    # Extract violations
    jq '.violations' report.json
  3. Adjust thresholds:

    policy:
    invariants:
    - metric: propagation_cost.system.ratio
    op: "<="
    value: 0.20 # Was 0.15, too strict
  4. Exclude specific patterns:

    import_graph:
    exclude:
    - "**/legacy/**" # Exclude legacy code temporarily

Symptoms: CI fails, but local run passes

Solutions:

  1. Cache differences:

    Terminal window
    # Clear cache
    arxo cache clear
    # Run analysis
    arxo analyze
  2. Git history depth: CI might have shallow clone:

    # GitHub Actions
    - uses: actions/checkout@v4
    with:
    fetch-depth: 0 # Full history for git-based metrics
  3. Config file location:

    Terminal window
    # Explicitly specify config in CI
    arxo analyze --config .arxo.yaml
  4. Environment differences:

    Terminal window
    # Check arxo version
    arxo --version
    # Ensure same version in CI and locally

Error: “Invalid config: unknown field ‘foo’”

Solution: Validate config:

Terminal window
arxo config validate --config .arxo.yaml

Common mistakes:

  1. Typos:

    # ❌ Wrong
    metriks: # Typo
    - id: scc
    # ✅ Correct
    metrics:
    - id: scc
  2. Indentation:

    # ❌ Wrong (2 spaces required)
    policy:
    invariants: # 4 spaces
    # ✅ Correct
    policy:
    invariants: # 2 spaces
  3. Invalid operators:

    # ❌ Wrong
    policy:
    invariants:
    - metric: scc.max_cycle_size
    op: "less_than" # Invalid
    # ✅ Correct
    policy:
    invariants:
    - metric: scc.max_cycle_size
    op: "<=" # Use: ==, !=, <, <=, >, >=

Error: “Config file not found: .arxo.yaml”

Solutions:

  1. Create config:

    Terminal window
    arxo init # Creates .arxo.yaml
  2. Specify path:

    Terminal window
    arxo analyze --config path/to/config.yaml
  3. Check working directory:

    Terminal window
    pwd # Should be project root
    ls -la # Should show .arxo.yaml

Error: “Unknown metric: foo”

Solution: List available metrics:

Terminal window
arxo metrics list

Check metric ID spelling:

# ❌ Wrong
metrics:
- id: strong_connected_components
# ✅ Correct
metrics:
- id: scc

Symptoms: Metric always returns 0 or empty

Causes:

  1. Missing required data: Some metrics need specific graphs:

    • scc needs import_graph
    • Call graph metrics need call_graph

    Enable required data:

    data:
    import_graph:
    enabled: true
    call_graph:
    enabled: true
  2. No violations found: Zero might be correct! Check if your code is actually healthy:

    Terminal window
    # Get full report
    arxo analyze --format json | jq '.results[] | select(.id=="scc")'

Error: “Unexpected token in JSON”

Solution: Ensure quiet mode:

Terminal window
# ❌ Wrong (includes progress output)
arxo analyze --format json
# ✅ Correct (JSON only)
arxo analyze --format json --quiet

Or redirect to file:

Terminal window
arxo analyze --format json --output report.json

Issue: HTML report is empty or doesn’t render

Solutions:

  1. Open in browser:

    Terminal window
    arxo analyze --format html --output report.html
    open report.html # macOS
    xdg-open report.html # Linux
    start report.html # Windows
  2. Check file size:

    Terminal window
    ls -lh report.html
    # Should be > 1KB
  3. Validate HTML:

    Terminal window
    head -n 20 report.html
    # Should start with <!DOCTYPE html>

Symptoms: Changes not reflected in analysis

Solution: Clear cache:

Terminal window
# Clear all cache
arxo cache clear
# Or disable cache
arxo analyze --no-analysis-cache

Issue: ~/.cache/arxo using too much disk space

Solutions:

  1. Clear old entries:

    Terminal window
    arxo cache clear
  2. Set custom cache location:

    run_options:
    cache_path: /tmp/arxo-cache
  3. Disable cache:

    run_options:
    disable_cache: true

Issue: Path mappings not recognized

Solution: Ensure tsconfig.json is present:

{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
}
}

Arxo reads tsconfig.json for path resolution.


Issue: Python imports not found

Solutions:

  1. Add __init__.py to packages:

    Terminal window
    touch src/__init__.py
    touch src/utils/__init__.py
  2. Check PYTHONPATH:

    .arxo.yaml
    languages:
    python:
    paths:
    - src
    - lib

Issue: Rust workspace members not analyzed

Solution: Ensure Cargo.toml has workspace config:

[workspace]
members = [
"crates/*",
]

Enable timing reports:

Terminal window
arxo analyze --report-timings

Output shows time spent on each stage:

Parsing: 2.3s
Import graph: 1.1s
Call graph: 0.8s
SCC: 0.2s
Propagation cost: 1.5s
...

Terminal window
# Environment info
arxo doctor
# Full analysis with JSON output (use RUST_LOG=debug for verbose logs)
arxo analyze --format json --output debug-report.json

CLI Logs:

Terminal window
# Enable verbose logging
RUST_LOG=debug arxo analyze

MCP Server Logs:

If using the MCP server in Cursor or another IDE:

  1. Open the MCP server logs panel in your IDE
  2. Select “Arxo” server
  3. Set log level to debug: --log-level debug in MCP config
  4. Review tool execution, cache hits, and errors

See MCP Configuration for log settings.

When reporting issues, include:

  1. Arxo version: arxo --version
  2. OS and Rust version: rustc --version
  3. Project type (TypeScript/Python/etc.)
  4. Error message or unexpected behavior
  5. Config file (if applicable)
  6. Debug report: arxo doctor

ErrorMeaningSolution
Failed to parseSyntax errorFix source file syntax
Config validation failedInvalid YAMLRun arxo config validate
Metric not foundWrong metric IDRun arxo metrics list
No files analyzedWrong path/excludesCheck path and exclusions
Policy violationThreshold exceededAdjust policy or fix code
Out of memoryGraph too largeLimit nodes or exclude files