Here is my component in Angular 4:
@Component( {
selector: \'input-extra-field\',
template: `
In my case, the error was triggered by duplicating an import of a component in the module.
I was getting this error message in my Unit tests with Jasmine. I added ngDefaultControl attribute to the custom element(in my case it was an angular material slide toggle) and this resolves the error.
<mat-slide-toggle formControlName="extraCheese">
Extra Cheese
</mat-slide-toggle>
Change the above element to include ngDefaultControl atttribute
<mat-slide-toggle ngDefaultControl formControlName="extraCheese">
Extra Cheese
</mat-slide-toggle>