|
| 1 | +# Troubleshooting |
| 2 | + |
| 3 | +Common issues and fixes. If your problem is not listed here, open a [GitHub issue](https://github.com/MehmetGoekce/llm-wiki/issues/new/choose). |
| 4 | + |
| 5 | +## Setup |
| 6 | + |
| 7 | +### `setup.sh: python3: command not found` |
| 8 | + |
| 9 | +**Cause:** Python 3 is not installed or not in your `PATH`. The setup script uses Python 3 to render page templates. |
| 10 | + |
| 11 | +**Fix:** |
| 12 | + |
| 13 | +- **macOS:** `brew install python3` |
| 14 | +- **Ubuntu/Debian:** `sudo apt install python3` |
| 15 | +- **Fedora:** `sudo dnf install python3` |
| 16 | +- **Windows:** Install from [python.org](https://www.python.org/downloads/) and check "Add python.exe to PATH" during install. |
| 17 | + |
| 18 | +Verify with `python3 --version`. The script requires Python 3.6 or newer (any version from the last ~8 years works). |
| 19 | + |
| 20 | +### `setup.sh: git: command not found` |
| 21 | + |
| 22 | +**Cause:** Git is not installed. Needed for the optional `git init` step and to clone the repo in the first place. |
| 23 | + |
| 24 | +**Fix:** |
| 25 | + |
| 26 | +- **macOS:** Comes with Xcode Command Line Tools — run `xcode-select --install`. |
| 27 | +- **Ubuntu/Debian:** `sudo apt install git` |
| 28 | +- **Fedora:** `sudo dnf install git` |
| 29 | +- **Windows:** Install [Git for Windows](https://git-scm.com/download/win). |
| 30 | + |
| 31 | +### `setup.sh` fails during template rendering |
| 32 | + |
| 33 | +**Cause:** Usually one of three things: |
| 34 | + |
| 35 | +1. The destination directory is not writable. |
| 36 | +2. The template directory is missing (corrupted clone or wrong working directory). |
| 37 | +3. A pre-existing file blocks template output. |
| 38 | + |
| 39 | +**Fix:** |
| 40 | + |
| 41 | +- Confirm you ran `./setup.sh` from inside the cloned `llm-wiki` directory, not from elsewhere. |
| 42 | +- Check the path you entered is writable: `touch ~/Documents/Logseq/test.txt && rm ~/Documents/Logseq/test.txt`. |
| 43 | +- If pre-existing pages block the render, setup will skip them. Delete the skipped pages manually if you want them regenerated. |
| 44 | +- Re-clone the repo if `templates/` looks empty or partial. |
| 45 | + |
| 46 | +### The script exits at "Which note-taking tool do you use?" |
| 47 | + |
| 48 | +**Cause:** Something other than `1` or `2` was entered. The script exits immediately on invalid input rather than re-prompting. |
| 49 | + |
| 50 | +**Fix:** Re-run `./setup.sh` and enter exactly `1` (Logseq) or `2` (Obsidian). If you prefer non-interactive runs (e.g., CI or testing): |
| 51 | + |
| 52 | +```bash |
| 53 | +echo -e "1\n~/test-wiki\ny\n\nskip\ny\nskip" | ./setup.sh |
| 54 | +``` |
| 55 | + |
| 56 | +See `CONTRIBUTING.md` for the full stdin sequence. |
| 57 | + |
| 58 | +## Wiki App Integration |
| 59 | + |
| 60 | +### New pages don't appear in the Logseq graph |
| 61 | + |
| 62 | +**Cause:** Logseq watches the `pages/` directory but only re-indexes under specific conditions. New files created while Logseq is running may not show up until you reload. |
| 63 | + |
| 64 | +**Fix:** |
| 65 | + |
| 66 | +1. In Logseq: `File → Reindex` (or `Cmd/Ctrl + Shift + R`). |
| 67 | +2. Confirm the file path is correct. Logseq pages live in `<graph-root>/pages/` and must use the `Wiki___Namespace___Page.md` triple-underscore naming. |
| 68 | +3. Check `journals/` is not accidentally being used — journals have a different format and will not render as regular wiki pages. |
| 69 | + |
| 70 | +### Obsidian shows YAML frontmatter as a code block instead of Properties |
| 71 | + |
| 72 | +**Cause:** Older Obsidian versions (before 1.4, released mid-2023) do not support the Properties feature. The frontmatter still works, but renders as literal text. |
| 73 | + |
| 74 | +**Fix:** |
| 75 | + |
| 76 | +- Update Obsidian to the latest version. |
| 77 | +- In Settings → Editor, ensure "Properties in document" is enabled. |
| 78 | +- If you deliberately disable Properties, the wiki still works — the LLM reads the YAML, and nothing breaks. The display is just uglier. |
| 79 | + |
| 80 | +### Cross-references `[[Wiki/Tech/Strapi]]` aren't clickable |
| 81 | + |
| 82 | +**Cause:** Wrong file-naming convention for the tool. |
| 83 | + |
| 84 | +**Fix:** |
| 85 | + |
| 86 | +- **Logseq** expects triple-underscore flat files: `Wiki___Tech___Strapi.md`. `[[Wiki/Tech/Strapi]]` resolves because Logseq treats `/` and `___` as equivalent path separators. |
| 87 | +- **Obsidian** expects directory hierarchy: `Wiki/Tech/Strapi.md`. The file literally lives inside `Wiki/Tech/`. |
| 88 | + |
| 89 | +If you mix conventions (e.g., triple-underscore files inside an Obsidian vault), links break. Check that `setup.sh` configured the correct tool — run it again and pick the tool matching your current vault. |
| 90 | + |
| 91 | +## Claude Code Integration |
| 92 | + |
| 93 | +### `/wiki` commands aren't available in Claude Code |
| 94 | + |
| 95 | +**Cause:** The skill was not installed into your project. `setup.sh` offers to copy it but it is optional. |
| 96 | + |
| 97 | +**Fix:** |
| 98 | + |
| 99 | +1. Confirm `.claude/commands/wiki.md` exists in your project directory. |
| 100 | +2. If missing, re-run `./setup.sh` and answer `y` at the "Install wiki skill in a project?" step, then provide the project path. |
| 101 | +3. Alternatively, copy manually: |
| 102 | + ```bash |
| 103 | + cp wiki.md ~/your-project/.claude/commands/wiki.md |
| 104 | + ``` |
| 105 | +4. In `wiki.md`, verify the `<CONFIG_PATH>` placeholder has been replaced with the absolute path to your `llm-wiki.yml`. |
| 106 | + |
| 107 | +Restart Claude Code for the skill to be picked up. |
| 108 | + |
| 109 | +### `/wiki ingest` runs forever or times out |
| 110 | + |
| 111 | +**Cause:** Source is too large, or the wiki has grown past the batch limit and Claude is trying to load too many pages at once. |
| 112 | + |
| 113 | +**Fix:** |
| 114 | + |
| 115 | +- Split large sources. A 10,000-word document should be ingested in 2-3 passes, not one. |
| 116 | +- The ingest pipeline has a 3-page batch limit — if your wiki has hundreds of pages and many are relevant to the source, processing takes proportionally longer. |
| 117 | +- If Claude Code hits a context limit mid-ingest, it will stop and report. Re-run the same ingest — Claude's append-only discipline prevents duplicates. |
| 118 | + |
| 119 | +### `/wiki ingest` blocks with a credential-leak warning but the content has no credentials |
| 120 | + |
| 121 | +**Cause:** False positive from lint rule #6. The credential-leak regex includes base64-like patterns (`[A-Za-z0-9+/]{40,}`), which also match innocent long strings — long URLs, hashes, or technical identifiers. |
| 122 | + |
| 123 | +**Fix:** |
| 124 | + |
| 125 | +1. Review the flagged content. If it is a genuine credential, move it to L1 (memory) and strip it from the source before re-ingesting. |
| 126 | +2. If it is a false positive (e.g., a commit SHA or a long URL), you have two options: |
| 127 | + - Edit the source to break the pattern (e.g., add a space or truncate). |
| 128 | + - Temporarily disable the base64 pattern in `llm-wiki.yml` → `lint.credential_patterns`. Re-enable it after the ingest. |
| 129 | + |
| 130 | +Never commit around the lint by force. The false positive rate is low, and genuine credential leaks have serious consequences. |
| 131 | + |
| 132 | +## Wiki Growth |
| 133 | + |
| 134 | +### The wiki has grown past 200 pages and feels unmanageable |
| 135 | + |
| 136 | +**Cause:** Natural friction at scale. Past ~200 pages, flat namespaces get noisy, hub pages grow long, and the mental model of "what is where" breaks down. |
| 137 | + |
| 138 | +**Fix:** |
| 139 | + |
| 140 | +- **Split namespaces.** If `Wiki/Tech/` has 50+ pages, consider splitting into `Wiki/Tech/Infrastructure/`, `Wiki/Tech/Languages/`, etc. Namespaces can go 3 levels deep. |
| 141 | +- **Consolidate hubs.** A hub page with 40 child links is useless. Group children into sub-sections with brief descriptions, not just a flat list. |
| 142 | +- **Run `/wiki lint` weekly.** Stale detection reveals pages that have not been updated in 90+ days — candidates for archival or deletion. |
| 143 | +- **Audit L1/L2.** If you find yourself querying the same L2 page every session, promote the essential part to L1. |
| 144 | + |
| 145 | +The wiki scales, but like any knowledge system, it requires periodic gardening. |
| 146 | + |
| 147 | +### `/wiki lint` keeps flagging the same orphan pages |
| 148 | + |
| 149 | +**Cause:** Pages that have no incoming links are flagged as orphans. If the same pages appear every run, they are genuinely unlinked. |
| 150 | + |
| 151 | +**Fix:** |
| 152 | + |
| 153 | +- Add the page to the appropriate hub page (e.g., `Wiki/Tech` hub should list all `Wiki/Tech/*` pages). |
| 154 | +- Add cross-references from related pages — if `Wiki/Projects/X` mentions `Wiki/Tech/Y`, make sure it uses `[[Wiki/Tech/Y]]` syntax. |
| 155 | +- Run `/wiki lint --fix` — it auto-adds missing hub entries where obvious. |
| 156 | + |
| 157 | +If a page is genuinely isolated and cannot be linked from anywhere, it may be a sign the page is misplaced (wrong namespace) or should be deleted. |
0 commit comments