2

I have tried this:

  1. Migrate angular project 13 to 14
  2. Add new component into existing module
  3. After that I have change formBuilder to UntypedFormBuilder then I get this error while build or serve project below is the screen shot and the code snippet

enter image description here

    ./node_modules/@angular/forms/fesm2020/forms.mjs:9326:6 - Error: Module parse failed: Identifier 'UntypedFormBuilder' has already been declared (9326:6)
File was processed with these loaders:
 * ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
 * ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| 
| 
> class UntypedFormBuilder extends UntypedFormBuilder {
|   group(controlsConfig, options = null) {
|     return super.group(controlsConfig, options);
E_net4
  • 27,810
  • 13
  • 101
  • 139

1 Answers1

3

I found the issue and issue was because of the .angular cache file. I delete .angular file from my project structure and delete node_modules. After re-installing npm packages resolve my problem.