ng serve
doesn't automatically recover if a component provided via NgModule disappears and then reappears
#27698
Labels
area: angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
serve (esbuild application builder)
Is this a regression?
I'm pretty sure not a recent regression. This behavior was also lately in the webpack build
Description
The title:
This behavior means that if you switch your working branch and someone removed or moved a component from one NgModule to another, you must restart
ng serve
to recover when you switch back or you are stuck with a bunch of errors of[ERROR] NG8001: 'app-foo' is not a known element
Minimal Reproduction
then remove the
FooComponent
export in theShared1Module
and add it back in. See how the error:Won't go away until you change the component where
<app-foo>
is actively used.Video of reproduction:
CleanShot.2024-05-23.at.15.52.42-converted.mp4
Your Environment
The text was updated successfully, but these errors were encountered: