title: Unable to run angular material with angular 10
body: <p>I am using the latest version of angular, which is angular 10 and unable to import any material components. As soon as I import angular material components it start giving errors.</p>
  <p>Step to reproduce issue:</p>
  <pre><code>ng new app
  </code></pre>
  <p>with angular cli 10.1.0</p>
  <pre><code>ng add @angular/material
  </code></pre>
  <p>On importing MatButton in App.ts the error is given below:</p>
  <pre><code>ERROR in node_modules/@angular/material/button/button.d.ts:22:22 - error NG6002:
   Appears in the NgModule.imports of AppModule, but could not be resolved to an N
  gModule class.
  
  This likely means that the library (@angular/material/button) which declares Mat
  Button has not been processed correctly by ngcc, or is not compatible with Angul
  ar 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 expec
  ted to be compatible with Ivy.
  
  22 export declare class MatButton extends _MatButtonMixinBase implements AfterVi
  ewInit, OnDestroy, CanDisable, CanColor, CanDisableRipple, FocusableOption { 
  </code></pre>
  <p>Package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;c-m-t&quot;,
    &quot;version&quot;: &quot;0.0.0&quot;,
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;ng build&quot;,
      &quot;test&quot;: &quot;ng test&quot;,
      &quot;lint&quot;: &quot;ng lint&quot;,
      &quot;e2e&quot;: &quot;ng e2e&quot;
    },
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/cdk&quot;: &quot;^10.2.0&quot;,
      &quot;@angular/common&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/compiler&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/core&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/forms&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/material&quot;: &quot;^10.2.0&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/router&quot;: &quot;~10.1.0&quot;,
      &quot;rxjs&quot;: &quot;~6.6.0&quot;,
      &quot;tslib&quot;: &quot;^2.0.0&quot;,
      &quot;zone.js&quot;: &quot;~0.10.2&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;~0.1001.0&quot;,
      &quot;@angular/cli&quot;: &quot;~10.1.0&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;~10.1.0&quot;,
      &quot;@types/node&quot;: &quot;^12.11.1&quot;,
      &quot;@types/jasmine&quot;: &quot;~3.5.0&quot;,
      &quot;@types/jasminewd2&quot;: &quot;~2.0.3&quot;,
      &quot;codelyzer&quot;: &quot;^6.0.0&quot;,
      &quot;jasmine-core&quot;: &quot;~3.6.0&quot;,
      &quot;jasmine-spec-reporter&quot;: &quot;~5.0.0&quot;,
      &quot;karma&quot;: &quot;~5.0.0&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-coverage-istanbul-reporter&quot;: &quot;~3.0.2&quot;,
      &quot;karma-jasmine&quot;: &quot;~4.0.0&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;^1.5.0&quot;,
      &quot;protractor&quot;: &quot;~7.0.0&quot;,
      &quot;ts-node&quot;: &quot;~8.3.0&quot;,
      &quot;tslint&quot;: &quot;~6.1.0&quot;,
      &quot;typescript&quot;: &quot;~4.0.2&quot;
    }
  }
  </code></pre>
  <p>App.ts</p>
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  
  import { AppRoutingModule } from './app-routing.module';
  import { AppComponent } from './app.component';
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  import { MatButton } from '@angular/material/button';
  
  @NgModule({
    declarations: [
      AppComponent
    ],
    imports: [
      BrowserModule,
      AppRoutingModule,
      BrowserAnimationsModule,
      MatButton
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>