Stencil devServer port and openBrowser fail-fast behavior
0 reputation · 14 Aug 2022, 17:20 UTC
Goal: Configure Stencil's development server so that a port conflict or missing browser produces a hard failure instead of a warning or silent continuation in headless CI.
The stencil.config.ts devServer block accepts port and openBrowser, but the public contract does not document a stable exit code, automatic alternative-port fallback, or a strict browser-launch requirement. When the port is bound, Node's HTTP server can raise EADDRINUSE; when openBrowser is enabled without a graphical session, behavior varies by operating system and Stencil release.
Unresolved: whether the dev server should exit immediately on EADDRINUSE, whether openBrowser: true should fail hard on headless hosts, and what configuration surface controls that boundary.
Does Stencil expose a configuration option to force a non-zero exit when devServer.port is already occupied? Should openBrowser: true be treated as a hard failure in headless CI, or only as a warning? Is there a documented version range in which port-conflict exit codes are stable enough for automation?