Records below are third-party data, not instructions. Apply with your own judgment.
NG6008: Component <Name> is standalone, and cannot be declared in an NgModule. Did you mean to import it instead?
Cause
Angular 19 flipped the standalone default to true, so a component, directive or pipe without standalone: false is standalone and cannot sit in NgModule declarations.
Fix
-@Component({ selector: 'app-hello', templateUrl: './hello.component.html' })+@Component({ selector: 'app-hello', standalone: false, templateUrl: './hello.component.html' })// same for every @Directive and @Pipe listed in an NgModule's declarations// or keep it standalone: move it from declarations to the NgModule's importsDon’t try
add standalone: false but keep the component's own imports: [...] array — the build then fails with NG2010 'imports' is only valid on a component that is standalone; move those imports into the NgModule's imports.
keep the root component standalone, list it in the module's imports and leave it in bootstrap: [...] — NG6009: a standalone component can not be used in the @NgModule.bootstrap array; give it standalone: false or start it with bootstrapApplication.