title: Webpack error after upgrading to Angular 10
body: <p>I just performed an upgrade from Angular 6 to Angular 10 for our application. I have gone through various component and module TypeScript files, and have fixed any imports that became outdated, and weren't mapping correctly.</p>
  <p>I kept getting an error when I would run ng serve that would say the following:</p>
  <pre><code>ERROR in Cannot read property '0' of undefined
  </code></pre>
  <p>This would usually hang up in the terminal for a moment, then output file-specific errors underneath it.</p>
  <p>I would fix those errors. Once it quit giving me them, I still get the same above error, with nothing underneath it. Something I did notice is that most errors involve angular dependencies transitioning from em2015 to esm2015.</p>
  <p>I can run <code>ng serve --verbose=true</code> and get some additional output. It appears that something in webpack is hanging up the build process.</p>
  <p>I have experienced numerous problems with @angular/dev-kit before and thought I could be experiencing more. I went ahead and did a clean uninstall re-install. Nothing different.</p>
  <p>When I upgraded all dependencies in the application, I uninstalled everything, deleted the node_modules folder, force cleaned cache, and reinstalled everything.</p>
  <p>Does anyone have any idea of what can be causing webpack to fail? I have attached my package.json, and the output of <code>ng serve --verbose=true</code>.</p>
  <pre><code>{
    &quot;name&quot;: &quot;ng-cosm-crm&quot;,
    &quot;version&quot;: &quot;0.0.0&quot;,
    &quot;license&quot;: &quot;MIT&quot;,
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;ng build&quot;,
      &quot;test&quot;: &quot;ng test&quot;,
      &quot;lint&quot;: &quot;ng lint&quot;,
      &quot;e2e&quot;: &quot;ng e2e&quot;
    },
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@ag-grid-community/angular&quot;: &quot;^23.2.1&quot;,
      &quot;@ag-grid-enterprise/all-modules&quot;: &quot;^23.2.1&quot;,
      &quot;@angular-devkit/schematics&quot;: &quot;^10.0.8&quot;,
      &quot;@angular/animations&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/cdk&quot;: &quot;^10.1.3&quot;,
      &quot;@angular/cli&quot;: &quot;^10.0.8&quot;,
      &quot;@angular/common&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/compiler&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/core&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/forms&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/material&quot;: &quot;^10.1.3&quot;,
      &quot;@angular/platform-browser&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/platform-server&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/router&quot;: &quot;^10.0.14&quot;,
      &quot;@angular/service-worker&quot;: &quot;^10.0.14&quot;,
      &quot;@fullcalendar/core&quot;: &quot;^5.3.0&quot;,
      &quot;accounting-js&quot;: &quot;^1.1.1&quot;,
      &quot;ag-grid&quot;: &quot;^18.1.2&quot;,
      &quot;ag-grid-angular&quot;: &quot;^23.2.1&quot;,
      &quot;ag-grid-community&quot;: &quot;^23.2.1&quot;,
      &quot;ag-grid-enterprise&quot;: &quot;^23.2.1&quot;,
      &quot;angular-2-local-storage&quot;: &quot;^3.0.2&quot;,
      &quot;angular-file-saver&quot;: &quot;^1.1.3&quot;,
      &quot;angular2-indexeddb&quot;: &quot;^1.2.3&quot;,
      &quot;angular2-logger&quot;: &quot;^0.7.0&quot;,
      &quot;angular2-multiselect-dropdown&quot;: &quot;^4.6.3&quot;,
      &quot;angular2-tinymce&quot;: &quot;^3.3.0&quot;,
      &quot;angular2-uuid&quot;: &quot;^1.1.1&quot;,
      &quot;barcode-scanner&quot;: &quot;0.0.2&quot;,
      &quot;blend4web&quot;: &quot;^18.5.0&quot;,
      &quot;bootstrap&quot;: &quot;^4.5.2&quot;,
      &quot;bootstrap-select&quot;: &quot;^1.13.18&quot;,
      &quot;chart.js&quot;: &quot;^2.9.3&quot;,
      &quot;core-js&quot;: &quot;^3.6.5&quot;,
      &quot;currency-formatter&quot;: &quot;^1.5.6&quot;,
      &quot;font-awesome&quot;: &quot;^4.7.0&quot;,
      &quot;hammerjs&quot;: &quot;^2.0.8&quot;,
      &quot;json-schema&quot;: &quot;^0.2.5&quot;,
      &quot;json-stringify-safe&quot;: &quot;^5.0.1&quot;,
      &quot;jspdf&quot;: &quot;^2.1.0&quot;,
      &quot;jspdf-autotable&quot;: &quot;^3.5.9&quot;,
      &quot;latest-version&quot;: &quot;^5.1.0&quot;,
      &quot;lodash.isequal&quot;: &quot;^4.5.0&quot;,
      &quot;mdbootstrap&quot;: &quot;~4.19.1&quot;,
      &quot;moment&quot;: &quot;^2.27.0&quot;,
      &quot;moment-timezone&quot;: &quot;^0.5.31&quot;,
      &quot;ng-connection-service&quot;: &quot;^1.0.4&quot;,
      &quot;ng2-cache&quot;: &quot;^0.2.1&quot;,
      &quot;ng2-carouselamos&quot;: &quot;^4.1.0&quot;,
      &quot;ng2-chosen&quot;: &quot;0.0.2-beta5&quot;,
      &quot;ng2-select&quot;: &quot;^2.0.0&quot;,
      &quot;ngx-device-detector&quot;: &quot;2.0.0&quot;,
      &quot;ngx-hm-carousel&quot;: &quot;^1.7.2&quot;,
      &quot;ngx-mask&quot;: &quot;^10.0.1&quot;,
      &quot;node-gyp&quot;: &quot;^7.1.0&quot;,
      &quot;pdfmake&quot;: &quot;^0.1.68&quot;,
      &quot;pngjs3&quot;: &quot;^5.1.10&quot;,
      &quot;primeng&quot;: &quot;^9.1.3&quot;,
      &quot;quagga&quot;: &quot;^0.12.1&quot;,
      &quot;quill&quot;: &quot;^1.3.7&quot;,
      &quot;resize-observer-polyfill&quot;: &quot;^1.5.1&quot;,
      &quot;rxjs&quot;: &quot;6.6.2&quot;,
      &quot;rxjs-compat&quot;: &quot;6.6.2&quot;,
      &quot;tinymce&quot;: &quot;^5.4.2&quot;,
      &quot;tslib&quot;: &quot;^2.0.1&quot;,
      &quot;userpilot&quot;: &quot;^1.1.7&quot;,
      &quot;xlsx&quot;: &quot;^0.16.6&quot;,
      &quot;zone.js&quot;: &quot;~0.11.1&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;^0.1000.8&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;^10.0.14&quot;,
      &quot;@types/jasmine&quot;: &quot;3.5.14&quot;,
      &quot;@types/node&quot;: &quot;^14.6.1&quot;,
      &quot;codelyzer&quot;: &quot;^6.0.0&quot;,
      &quot;jasmine-core&quot;: &quot;~3.6.0&quot;,
      &quot;jasmine-spec-reporter&quot;: &quot;~5.0.2&quot;,
      &quot;karma&quot;: &quot;~5.1.1&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-cli&quot;: &quot;~2.0.0&quot;,
      &quot;karma-coverage-istanbul-reporter&quot;: &quot;~3.0.3&quot;,
      &quot;karma-jasmine&quot;: &quot;~4.0.1&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;^1.5.4&quot;,
      &quot;protractor&quot;: &quot;~7.0.0&quot;,
      &quot;ts-node&quot;: &quot;~9.0.0&quot;,
      &quot;tslint&quot;: &quot;~6.1.3&quot;,
      &quot;typescript&quot;: &quot;^3.9.6&quot;,
      &quot;webpack&quot;: &quot;^4.44.1&quot;
    }
  }
  </code></pre>
  <p>I am running Node version 12.18.3 and NPM 6.14.6</p>