From 6546ee92b77d9b1dc86c31cbd1dd72f86db5b105 Mon Sep 17 00:00:00 2001 From: Brian Casel Date: Thu, 21 May 2026 10:01:57 -0400 Subject: [PATCH] Free Vite and SSR ports and clear stale pidfile in conductor run script Why: starting bin/dev would frequently fail because port 3036 (Vite) or 13714 (SSR) was still bound from a previous run, or because a stale tmp/pids/server.pid blocked Rails from booting. Killing only :3000 left those failure modes intact. Co-Authored-By: Claude Opus 4.7 (1M context) --- conductor.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conductor.json b/conductor.json index 4fc0525..8a42281 100644 --- a/conductor.json +++ b/conductor.json @@ -1,7 +1,7 @@ { "scripts": { "setup": "# bundle, create db, migrate, run seeds\nbin/setup\n\n# install frontend deps\nnpm install", - "run": "# Kill whatever is running on port 3000\nlsof -ti :3000 | xargs kill -9\nbin/dev", + "run": "# Free ports (Rails 3000, Vite 3036, SSR 13714) and clear stale pidfile\nlsof -ti :3000 -ti :3036 -ti :13714 2>/dev/null | xargs kill -9 2>/dev/null || true\nrm -f tmp/pids/server.pid\nbin/dev", "archive": "# Frontend deps\nrm -rf node_modules\n\n# Vite build output\nrm -rf public/vite public/vite-ssr public/vite-dev\n\n# Rails tmp + logs\nrm -rf tmp/cache tmp/pids tmp/sockets tmp/storage\nrm -f log/*.log" } }