> ## Documentation Index
> Fetch the complete documentation index at: https://witchking.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Common issues and fixes for TI Agent.

## `Missing parameter name` crash on `node server.js`

You have Express 4 installed. Upgrade to Express 5:

```bash theme={null}
npm install express@5
```

## `Cannot find module 'node-fetch'`

```bash theme={null}
npm install node-fetch@2
```

Note the `@2` — v3 is ESM-only and incompatible with CommonJS `require()`.

## `better-sqlite3` Fails to Build

**macOS:**

```bash theme={null}
xcode-select --install
```

**Linux:**

```bash theme={null}
sudo apt install build-essential python3
```

## DB File Not Created / Not Visible

The DB is created in the same directory as `server.js`. If the project is inside iCloud Drive, iCloud may be syncing the file to the cloud and hiding it locally. Move the project to a local path outside `~/Library/Mobile Documents/`.

## No Articles Found in Window

Most feeds publish infrequently. Try widening the date window to **7d or 14d**. Some feeds require authentication or use non-standard formats and will return zero articles. Check the server terminal — failed feeds are logged with the specific error.

## PDF Exports with White Background

In Chrome's print dialog, enable **Background graphics** (More settings → Background graphics).

## DOCX Opens with "Unreadable Content" Warning

Ensure you are running the latest version of `server.js` — the DOCX is now a proper ZIP archive.

## Hunt Tab: "Claude CLI Not Found"

This is virtually always a `PATH` issue, not an auth issue. Node's `execFile()` never spawns a shell, so it only sees the `PATH` the `node server.js` process started with — it does **not** read `.zshrc` / `.bash_profile`.

`server.js` checks common install locations (`~/.local/bin`, `~/.claude/local/bin`, `/opt/homebrew/bin`, `/usr/local/bin`) and logs which one it resolved at startup:

```
🔎  Claude CLI resolved to: /Users/you/.local/bin/claude
```

If that line is missing, restart `node server.js` from a **fresh terminal** after running `claude login`. Reinstalling is never needed — only a server restart.

## Security Notes

* The Anthropic API key is **never written to disk or any browser storage** — it lives in React state only and is cleared on every page reload.
* The backend strips the `apiKey` field from all config saves and exports.
* The server has **no authentication** and is designed for local single-user use only. Do not expose port 3001 to a network.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.