# Ghost Node — Error log

> **Purpose:** Record errors we hit (you or AI) and what fixed them. Newest first. Use for quick lookup when the same or similar error appears again.
> **When to add:** After resolving an error worth remembering. If it becomes a reusable pattern, also add to MEMORY.md.

---

## Format (each entry)

- **When:** date or session
- **Error:** exact message or short description
- **Context:** where (PowerShell, browser, worker.py, frontend build, etc.)
- **Fix:** what fixed it
- **Prevent:** how to avoid next time (if any)

---

## Entries (newest first)

### Next.js static export still redirects `/` to `/dashboard`

- **When:** 2026-03-13
- **Error:** Visiting `http://localhost:8000/` still redirected to `/dashboard` after changing `frontend/app/page.tsx`.
- **Context:** Static build in `frontend/out/` was stale and still contained old redirect artifacts (`NEXT_REDIRECT;replace;/dashboard`).
- **Fix:** Rebuild static frontend: `npm run build --prefix frontend`. Also restored `'use client'` in `frontend/components/layout/Header.tsx` after accidental removal caused prerender failure (`useSyncExternalStore is not a function`).
- **Prevent:** After changing routes/pages in Next.js static export mode, always rebuild `frontend/out/` before testing via FastAPI.

### ModuleNotFoundError: No module named 'httpx'

- **When:** 2026-03-13
- **Error:** `ModuleNotFoundError: No module named 'httpx'` (or similar for fastapi, playwright, sqlalchemy, etc.)
- **Context:** Running `python worker.py` from project root. Dependencies not installed in current Python environment.
- **Fix:** From project root run: `pip install -r requirements.txt`. Then run `python worker.py` again.
- **Prevent:** After cloning or first setup, always run `pip install -r requirements.txt`. If you use a venv, activate it first.

### npx / node not recognized in PowerShell

- **When:** 2026-03-13
- **Error:** `The term 'npx' is not recognized as the name of a cmdlet, function, script file, or operable program.`
- **Context:** Running `npx vitest run` or `npm run build` from project frontend. Node was either not installed or not on PATH in that shell.
- **Fix:** (1) Install Node.js (default `C:\Program Files\nodejs\`) and open a **new** PowerShell so PATH is updated. (2) Or run once in that window: `$env:PATH = "C:\Program Files\nodejs;$env:PATH"`. Then `node --version` and `npx --version` to confirm.
- **Prevent:** Use a new terminal after installing Node; or document PATH step for portable/other installs.

### cd frontend fails: "Cannot find path ... frontend"

- **When:** 2026-03-13
- **Error:** `Cannot find path 'C:\WINDOWS\system32\frontend' because it does not exist.`
- **Context:** Running `cd frontend` from `C:\WINDOWS\system32` (wrong directory).
- **Fix:** First `cd` to the project root, then to frontend: `cd "C:\Users\Abbas\Documents\Downloads\ClaudeAuction2"` then `cd frontend`. Or in one step: `cd "C:\Users\Abbas\Documents\Downloads\ClaudeAuction2\frontend"`.
- **Prevent:** Run commands from project directory; or use full path to frontend.

---

*Append new entries above this line.*

