title: Cannot read properties of undefined (reading 'add') in angular 12?
body: <p>I am upgrading my application from Angular 9 to 12. I used the below command.</p>
  <pre><code>ng update @angular/core@12 @angular/cli@12 --allow-dirty --force 
  </code></pre>
  <p>After run the project I am getting <strong>Cannot read properties of undefined (reading 'add')</strong>,i don't know what is wrong
  Attached screenshot for your reference.
  <a href="https://i.stack.imgur.com/rbW6s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rbW6s.png" alt="enter image description here" /></a></p>
  <p><strong>package.json file</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "name": "ewapps-poc",
    "version": "0.0.0",
    "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e",
      "startplat": "ng serve platform-port --port=4201",
      "startpub": "ng serve publisher-port --port=4202",
      "startbiz": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng serve business-port --port=4203",
      "startcust": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng serve customer-port --port=4204",
      "startvend": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng serve vendor-port --port=4205",
      "buildplat": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --build-optimizer --base-href=platform --project=platform-port",
      "buildpub": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --build-optimizer --base-href=publisher --project=publisher-port ",
      "buildcust": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod  --build-optimizer  --base-href=customer --project=customer-port --configuration=production",
      "buildcustmysql": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod  --build-optimizer  --base-href=customer --project=customer-port --configuration=mysql",
      "buildcustsql": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod  --build-optimizer  --base-href=customer --project=customer-port --configuration=sql",
      "buildbiz": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --build-optimizer --base-href=business --project=business-port",
      "buildvend": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --build-optimizer --base-href=vendor --project=vendor-port"
    },
    "private": true,
    "dependencies": {
      "@agm/core": "^1.0.0-beta.6",
      "@angular/animations": "~12.2.16",
      "@angular/cdk": "^8.0.0",
      "@angular/common": "~12.2.16",
      "@angular/compiler": "~12.2.16",
      "@angular/core": "~12.2.16",
      "@angular/forms": "~12.2.16",
      "@angular/platform-browser": "~12.2.16",
      "@angular/platform-browser-dynamic": "~12.2.16",
      "@angular/router": "~12.2.16",
      "@aspnet/signalr": "^1.1.4",
      "@ngx-translate/core": "^11.0.1",
      "@ngx-translate/http-loader": "^4.0.0",
      "@progress/kendo-angular-buttons": "^5.0.0",
      "@progress/kendo-angular-charts": "^6.0.0",
      "@progress/kendo-angular-common": "^1.0.0",
      "@progress/kendo-angular-dateinputs": "^4.0.0",
      "@progress/kendo-angular-dropdowns": "^4.0.0",
      "@progress/kendo-angular-excel-export": "^3.0.0",
      "@progress/kendo-angular-grid": "^4.1.1",
      "@progress/kendo-angular-inputs": "^6.0.0",
      "@progress/kendo-angular-intl": "^2.0.0",
      "@progress/kendo-angular-l10n": "^2.0.0",
      "@progress/kendo-angular-pdf-export": "^2.0.0",
      "@progress/kendo-angular-popup": "^3.0.0",
      "@progress/kendo-angular-upload": "^6.0.0",
      "@progress/kendo-data-query": "^1.0.0",
      "@progress/kendo-drawing": "^1.0.0",
      "@progress/kendo-licensing": "^1.2.2",
      "@progress/kendo-theme-default": "latest",
      "@types/moment-timezone": "^0.5.12",
      "@types/node": "^8.10.66",
      "bootstrap": "^3.3.7",
      "classlist.js": "^1.1.20150312",
      "croppie": "^2.6.4",
      "google-libphonenumber": "^3.2.2",
      "hammerjs": "^2.0.8",
      "jquery": "^3.4.1",
      "moment": "^2.24.0",
      "moment-timezone": "^0.5.25",
      "ng-lazyload-image": "^9.1.0",
      "ng-search-filter": "^1.1.0",
      "ng2-search-filter": "^0.5.1",
      "ngx-device-detector": "^1.3.9",
      "ngx-print": "^1.2.1",
      "ngx-toastr": "^10.0.4",
      "oidc-client": "^1.7.1",
      "rxjs": "~7.5.5",
      "rxjs-compat": "^6.5.2",
      "stacktrace-js": "^2.0.0",
      "ts.validator.fluent": "^1.3.0",
      "tslib": "^2.4.0",
      "typescript-collections": "^1.3.2",
      "zone.js": "~0.11.5"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "~12.2.17",
      "@angular-devkit/build-ng-packagr": "~0.801.3",
      "@angular/cli": "~12.2.17",
      "@angular/compiler-cli": "~12.2.16",
      "@angular/language-service": "~12.2.16",
      "@angular/localize": "^12.2.16",
      "@types/jasmine": "~3.3.8",
      "@types/jasminewd2": "~2.0.3",
      "@types/moment": "^2.13.0",
      "codelyzer": "^5.0.0",
      "jasmine-core": "~3.4.0",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~6.3.20",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "~2.0.1",
      "karma-jasmine": "~2.0.1",
      "karma-jasmine-html-reporter": "^1.4.0",
      "ng-packagr": "^12.2.7",
      "protractor": "~7.0.0",
      "ts-node": "~7.0.0",
      "tsickle": "^0.35.0",
      "tslint": "~6.1.3",
      "typescript": "~4.3.5"
    }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>If you need anything other than package.json file, please let me know</p>
  <p>Someone, please help me out.</p>