After upgrade to Angular 6/Material 6 why am I facing 'mat-input-container is not a known element'?

This CSS class has been removed beginning version

6.0.0-beta.5 (2018-03-23)

mat-input-container has been deprecated, instead use mat-form-field

For details of breaking changes in 6.0.0-beta.5:

https://github.com/angular/material2/blob/master/CHANGELOG.md#600-beta5-2018-03-23

For details of breaking changes in general, refer:

https://github.com/angular/material2/blob/master/CHANGELOG.md


As per https://material.angular.io/components/form-field/overview we are now supposed to use mat-form-field

  <mat-form-field>
    <mat-select placeholder="Select">
      <mat-option value="option">Option</mat-option>
    </mat-select>
  </mat-form-field>