mat-form-field must contain a MatFormFieldControl and already imported

I fixed the issue by adding a hidden input field.

<mat-form-field>
 <mat-label>My Label</mat-label>
 <input matInput [hidden]="true" [(ngModel)]="myModel" name="myModel">
 <mat-checkbox class="ml-3" [(ngModel)]="myModel" name="myModel"></mat-checkbox>
</mat-form-field>

Actually the error doesn't mean a module import problem, but that you're using the mat-form-field without a valid control.

The problem is here :

<mat-form-field>
    <mat-checkbox formControlName="active">Active</mat-checkbox>
</mat-form-field>

MatChebox isn't intended to be contained in a mat-form-field but yeah its name is not very clear ... Keep just in mind that mat-form-field is the component that handles underline + hint + floating label + errors, etc ...

The list of supported child component is : input / textarea / select / chip-list (see https://material.angular.io/components/form-field/overview)