Skip to content

fix(report): --serve stops as soon as the Angular build fails (0.18.2) - #46

Merged
DuncanFaulkner merged 2 commits into
mainfrom
fix/serve-fail-fast
Oct 14, 2026
Merged

DuncanFaulkner merged 2 commits into
mainfrom
fix/serve-fail-fast

Conversation

@DuncanFaulkner

Copy link
Copy Markdown
Contributor

ng serve keeps watching after a failed build and never answers, so --serve used to wait the full --serve-timeout (180 s) and then report that the server didn't answer.

startDevServer now watches the server's output for "Application bundle generation failed" (application builder) or "Failed to compile" (webpack). It waits until "Watch mode enabled" (at most 2 s) to collect the error lines, then stops the server and throws "The Angular build failed, so the dev server never started: " with the output tail. The CLI exits 2. The timeout is still the fallback.

Output lines split across chunks are now buffered, so a failure line can't be missed.

  • 431/431 tests, 3 new
  • Tried on a real ng serve with a broken import: exit 2 after 2 s, where it used to wait 180 s
  • CHANGELOG 0.18.2, version bump

@DuncanFaulkner
DuncanFaulkner merged commit b625e98 into main Oct 14, 2026
1 check passed
@DuncanFaulkner
DuncanFaulkner deleted the fix/serve-fail-fast branch October 14, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant