ERROR in node_modules/@angular/common/http/http.d.ts:2801:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
2801 export declare class HttpClientModule {
I had the same issue.
I was going through comments here https://github.com/angular/angular/issues/35399 for solution.
I simple ran ng serve --prod
and the error was gone. After that I even ran ng serve
.
Other solutions proposed are
"enableIvy": false
to compilerOptions in tsconfig.app.json