|
| 1 | +# Troubleshooting |
| 2 | + |
| 3 | +Quick solutions for common issues. For detailed troubleshooting, see the [full guide on GitHub](https://github.com/lytics/dev-agent/blob/main/TROUBLESHOOTING.md). |
| 4 | + |
| 5 | +## Installation Issues |
| 6 | + |
| 7 | +### `dev: command not found` |
| 8 | + |
| 9 | +Global npm bin directory not in PATH: |
| 10 | + |
| 11 | +```bash |
| 12 | +# Find npm bin directory |
| 13 | +npm config get prefix |
| 14 | + |
| 15 | +# Add to shell profile (~/.zshrc or ~/.bashrc) |
| 16 | +export PATH="$(npm config get prefix)/bin:$PATH" |
| 17 | + |
| 18 | +# Reload |
| 19 | +source ~/.zshrc |
| 20 | +``` |
| 21 | + |
| 22 | +### Permission errors on install |
| 23 | + |
| 24 | +```bash |
| 25 | +# Option 1: Use npx (no install needed) |
| 26 | +npx dev-agent index . |
| 27 | + |
| 28 | +# Option 2: Fix npm permissions |
| 29 | +npm config set prefix ~/.npm-global |
| 30 | +export PATH=~/.npm-global/bin:$PATH |
| 31 | +npm install -g dev-agent |
| 32 | +``` |
| 33 | + |
| 34 | +## Indexing Issues |
| 35 | + |
| 36 | +### "No source files found" |
| 37 | + |
| 38 | +```bash |
| 39 | +# Verify you're in repository root |
| 40 | +ls -la # Should see .git/ |
| 41 | + |
| 42 | +# Check for supported files |
| 43 | +find . -name "*.ts" -o -name "*.js" | head -10 |
| 44 | +``` |
| 45 | + |
| 46 | +### "Vector storage initialization failed" |
| 47 | + |
| 48 | +```bash |
| 49 | +# Check permissions |
| 50 | +ls -la ~/.dev-agent/ |
| 51 | + |
| 52 | +# Clear and rebuild |
| 53 | +rm -rf ~/.dev-agent/indexes/* |
| 54 | +dev index . |
| 55 | +``` |
| 56 | + |
| 57 | +## MCP Server Issues |
| 58 | + |
| 59 | +### Server won't start |
| 60 | + |
| 61 | +```bash |
| 62 | +# 1. Check if indexed |
| 63 | +ls -la ~/.dev-agent/indexes/ |
| 64 | + |
| 65 | +# 2. Verify installation |
| 66 | +dev mcp list --cursor # or without --cursor |
| 67 | + |
| 68 | +# 3. Test manually |
| 69 | +dev mcp start --verbose |
| 70 | +``` |
| 71 | + |
| 72 | +### "Repository not indexed" in Cursor |
| 73 | + |
| 74 | +```bash |
| 75 | +# Index the workspace |
| 76 | +dev index . |
| 77 | + |
| 78 | +# Restart Cursor |
| 79 | +``` |
| 80 | + |
| 81 | +### Rate limit errors (429) |
| 82 | + |
| 83 | +- Wait for `retryAfterMs` period |
| 84 | +- Check health: `dev_health` |
| 85 | +- Restart AI tool if persistent |
| 86 | + |
| 87 | +## Search Issues |
| 88 | + |
| 89 | +### No results |
| 90 | + |
| 91 | +```bash |
| 92 | +# Verify indexed |
| 93 | +dev stats |
| 94 | + |
| 95 | +# Re-index if needed |
| 96 | +dev index . |
| 97 | +``` |
| 98 | + |
| 99 | +**Tips for better searches:** |
| 100 | +- Use natural language, not exact code |
| 101 | +- Describe what code does |
| 102 | +- Try different phrasings |
| 103 | + |
| 104 | +### Poor relevance |
| 105 | + |
| 106 | +Adjust score threshold: |
| 107 | +- `0.7+` — Precise matches only |
| 108 | +- `0.4-0.6` — Balanced |
| 109 | +- `0.25-0.3` — Exploratory |
| 110 | + |
| 111 | +## GitHub Integration |
| 112 | + |
| 113 | +### `dev gh index` fails |
| 114 | + |
| 115 | +```bash |
| 116 | +# Check GitHub CLI |
| 117 | +gh auth status |
| 118 | + |
| 119 | +# Login if needed |
| 120 | +gh auth login |
| 121 | +``` |
| 122 | + |
| 123 | +### Stale GitHub data |
| 124 | + |
| 125 | +```bash |
| 126 | +dev gh index # Re-index |
| 127 | +``` |
| 128 | + |
| 129 | +## Quick Fixes |
| 130 | + |
| 131 | +### Clear everything and start fresh |
| 132 | + |
| 133 | +```bash |
| 134 | +rm -rf ~/.dev-agent/indexes/* |
| 135 | +dev index . |
| 136 | +dev gh index |
| 137 | +dev mcp install --cursor |
| 138 | +``` |
| 139 | + |
| 140 | +### Check health |
| 141 | + |
| 142 | +``` |
| 143 | +Use dev_health tool in Cursor/Claude Code |
| 144 | +``` |
| 145 | + |
| 146 | +### Enable debug logging |
| 147 | + |
| 148 | +**Cursor:** Edit `~/.cursor/mcp.json`: |
| 149 | +```json |
| 150 | +"env": { "LOG_LEVEL": "debug" } |
| 151 | +``` |
| 152 | + |
| 153 | +## Getting Help |
| 154 | + |
| 155 | +1. Run `dev_health` for diagnostics |
| 156 | +2. Check [full troubleshooting guide](https://github.com/lytics/dev-agent/blob/main/TROUBLESHOOTING.md) |
| 157 | +3. [File an issue](https://github.com/lytics/dev-agent/issues) with: |
| 158 | + - `dev --version` |
| 159 | + - `dev_health` output |
| 160 | + - Steps to reproduce |
| 161 | + |
0 commit comments