title: error : Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
body: <p>I had this message when I've tried to ng serve, and I don't know what this means and what I should do, someone can help?</p>
  <blockquote>
  <p>Error: node_modules/@angular/router/router.d.ts:54:22 - <code>error NG6002</code>:
  Appears in the NgModule.imports of AppModule, but could not be
  resolved to an NgModule class.</p>
  <p>This likely means that the library (@angular/router) which declares
  ActivatedRoute has not been processed correctly by ngcc, or is not
  compatible  with Angular Ivy. Check if a newer version of the library
  is available, and update if so. Also consider checking with the
  library's authors to see if the library is expected to be compatible
  with Ivy.</p>
  <p>export declare class ActivatedRoute {</p>
  </blockquote>
  <p>that is my <code>router.d.ts</code> file :</p>
  <blockquote>
  <p>import * as ɵngcc0 from '@angular/core';
  export declare classActivatedRoute {</p>
  </blockquote>
  <blockquote>
  <pre><code>url: Observable&lt;UrlSegment[]&gt;;
  params: Observable&lt;Params&gt;;
  queryParams: Observable&lt;Params&gt;;
  fragment: Observable&lt;string&gt;;
  data: Observable&lt;Data&gt;;
  outlet: string;
  component: Type&lt;any&gt; | string | null;
  snapshot: ActivatedRouteSnapshot;
  get routeConfig(): Route | null;
  get root(): ActivatedRoute;
  
  get parent(): ActivatedRoute | null;
  get firstChild(): ActivatedRoute | null;
  get children(): ActivatedRoute[];
  get pathFromRoot(): ActivatedRoute[];
  get paramMap(): Observable&lt;ParamMap&gt;;
  get queryParamMap(): Observable&lt;ParamMap&gt;;
  toString(): string; }
  </code></pre>
  </blockquote>
  <p>that is   app.module.ts file</p>
  <pre><code>&gt; import { NgModule } from '@angular/core';
  &gt; import { BrowserModule } from '@angular/platform-browser';
  &gt; import { HttpClientModule } from '@angular/common/http';
  
  &gt; import { AppRoutingModule } from './app-routing.module'; 
  &gt; import { AppComponent } from './app.component';
  &gt; import { FooterComponent } from'./footer/footer.component'; 
  &gt;import { NavbarComponent } from './navbar/navbar.component'; 
  &gt;import { ProductsComponent } from './products/products.component';
  &gt; import { ProductListComponent } from './product-list/product-list.component';
  &gt; import { SideBarComponent } from './side-bar/side-bar.component';
  &gt; import { UserComponent } from './user/user.component';
  &gt; import { HomeComponent } from './home/home.component';
  &gt; import { LoginComponent } from './login/login.component';
  &gt; import { CartComponent } from './cart/cart.component';
  &gt; import { ContactsComponent } from'./contacts/contacts.component';
  &gt; import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
  &gt; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
  &gt; import { SignupComponent } from './signup/signup.component';
  &gt; import { ProductDetailsComponent } from './product-details/product-details.component';
  &gt; import { ActivatedRoute } from '@angular/router';
  
  &gt; @NgModule({   declarations: [
  &gt;     AppComponent,
  &gt;     FooterComponent,
  &gt;     NavbarComponent,
  &gt;     ProductsComponent,
  &gt;     ProductListComponent,
  &gt;     SideBarComponent,
  &gt;     UserComponent,
  &gt;     HomeComponent,
  &gt;     LoginComponent,
  &gt;     CartComponent,
  &gt;     ContactsComponent,
  &gt;     PageNotFoundComponent,
  &gt;     SignupComponent,
  &gt;     ProductDetailsComponent,   ], 
  &gt;  imports: [
  &gt;     BrowserModule,
  &gt;     AppRoutingModule,
  &gt;     FormsModule,
  &gt;     ReactiveFormsModule,
  &gt;     ActivatedRoute,
  &gt;     HttpClientModule,   ],   
  &gt;providers: [],  
  &gt; bootstrap: [AppComponent] })
  </code></pre>
  <blockquote>
  <p>export class AppModule { }</p>
  </blockquote>