title: The Angular Material version (12.1.4) does not match the Angular CDK version (12.2.1). Please ensure the versions of these two packages exactly match
body: <p>After installing <a href="https://github.com/angular/flex-layout" rel="nofollow noreferrer">FlexLayout</a> using this command</p>
  <pre><code>npm i -s @angular/flex-layout @angular/cdk
  </code></pre>
  <p>Which obviously install <code>Angular CDK</code> as well, i'm getting the following warning</p>
  <pre><code>The Angular Material version (12.1.4) does not match the Angular CDK version (12.2.1).
  Please ensure the versions of these two packages exactly match.
  </code></pre>
  <p>I used <code>ng update</code> command in order to update packages, also tried <code>ng add @angular/material</code>, but i'm still with the same versions.</p>
  <p>How do I solve this?</p>
  <p><strong>SOLUTION</strong></p>
  <p>The commands <code>ng add @angular/material</code> &amp; <code>ng add @angular/material@latest</code> works just fine, i checked the <code>package.json</code> file and noticed that i had</p>
  <pre><code>&quot;dependencies&quot;: {
      ...
      &quot;@angular/material&quot;: &quot;^12.2.1&quot;
      ... 
  }
  </code></pre>
  <p><strong>it just needed an <code>ng serve</code> again.</strong></p>
  <p>And one more thing, It seems like updating <code>Angular Material</code> doesn't really overrides the <code>styles.scss</code> file, but actually adds the same code again to the file, so i had to delete that too in order to get rid of the scss errors.</p>