Maureen Moore

Maureen Moore

  • NA
  • 206
  • 0

The library (@angular/forms) which declares FormBuilder has not been p

Jun 26 2020 5:53 PM
I get the following error when I execute ng serve:
ERROR in node_modules/@angular/forms/forms.d.ts:1616:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (@angular/forms) which declares FormBuilder has not been processed correctly by ngcc, or is not compatible with Angular 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 expected to be compatible with Ivy.
1616 export declare class FormBuilder {
~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2148:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (@angular/forms) which declares FormGroup has not been processed correctly by ngcc, or is not compatible with Angular 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 expected to be compatible with Ivy.
2148 export declare class FormGroup extends AbstractControl {
~~~~~~~~~
I tried deleting the node_modules folder and re-installing it. I tried updating the library @angular/forms. I tried running ng build first. I tried editting the angular.json folder with "scripts": {
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points" I tried running npm ci in the terminal. I tried ng update @angular/material/forms. I tried some other things that I don't remember too. I am on a Windows operating system.


Answers (2)