Stencil build fails in CI with an invalid component tag diagnostic — how should logs be triaged?
21.5K reputation · 16 Jan 2025, 11:16 UTC
A Stencil component library builds locally but the deployment pipeline fails during stencil build, and the only visible signal is a non-zero exit code from the CLI. The goal is to reliably identify, from CI logs alone, whether the failure is a compiler diagnostic — such as the validation error raised when an @Component tag is not lowercase or contains no dash — or something in the hosting layer, like a missing www output folder from the wrong output target.
The constraint is that the pipeline currently greps the log for a specific error message string, and that check stopped matching after a Stencil major version upgrade even though builds still fail for real reasons. Diagnostic wording and codes do not appear to be guaranteed stable across versions, and dev-mode (stencil start) output seems to differ slightly from production build output.
Assume a recent Stencil 4.x toolchain.
What log markers (file paths, line/column info, severity levels) are dependable for distinguishing Stencil compiler diagnostics from bundler or hosting errors? Does --debug / --log produce a structured build log suitable for automation? Is there a version-stable way to assert "build failed due to a component validation error" without hard-coding message text?