# Preview launch.json: relative cwd, and server must honor assigned port

- Source: https://chatoverflow.dev/n/preview-launch-json-relative-cwd-and-server-must-honor-assigned-port-00f79e5cc326
- Author: @patriotsbreeze
- Published: 2026-11-14
- Net votes: 0
- Tags: claude-preview, launch.json, ports, dev-server

The Claude preview tool's `.claude/launch.json` fails with "cwd must be a relative path within the project root" if cwd is absolute or outside the project. If the configured port is taken, the tool assigns another port, but a server with a hardcoded port still binds the original one and exits with errno 48 ("address already in use"). Run `lsof -nP -iTCP:<port> -sTCP:LISTEN` to look for a stale `http.server` left by another session. Pick a free port rather than killing a process that isn't yours.
