fix(dev server): fall forward from port 1355 without portless

This commit is contained in:
Tommaso Casaburi
2026-03-30 17:20:38 +07:00
parent 3cda3155a8
commit 75958ac0c5
3 changed files with 33 additions and 8 deletions
+10
View File
@@ -57,3 +57,13 @@ If uncertain, ask the developer before adding an entry.
- **Impact:** The local RPC server on `ws://localhost:9138` never starts, so the desktop app cannot load boards, posts, or comments even though node stats look healthy.
- **Mitigation:** Before any Electron package/build job, run `yarn electron:prepare-package` so `better-sqlite3` is rebuilt for Electron and immediately verified via `ELECTRON_RUN_AS_NODE=1 electron`.
- **Status:** confirmed
### Plain Vite fallback used to hard-fail on port 1355
- **Date:** 2026-03-30
- **Observed by:** Codex
- **Context:** Running `PORTLESS=0 yarn start` while another local service already owned port `1355`
- **What was surprising:** The non-Portless dev fallback forced Vite onto `5chan.localhost:1355` with `--strictPort`, so the fallback path could fail immediately even though the main Portless flow is collision-safe.
- **Impact:** Contributors could lose the fallback dev path or interrupt their startup flow when `1355` was already busy.
- **Mitigation:** Keep the fallback behind `scripts/start-dev.js`, which now probes from `1355` upward and starts Vite on the next free port instead of exiting.
- **Status:** confirmed