title: Angular 11 is not running ngcc
body: <p>I have an old Angular application, which I have upgraded from Angular 9 to Angular 11. (It had many stable upgrades throughout the years, starting from Angular 2)</p>
  <p>My problem is, that the <code>ngcc</code> is not running <code>ng build</code>:</p>
  <pre><code>$ ng build
      'node-sass' usage is deprecated and will be removed in a future major version. To opt-out of the deprecated behaviour and start using 'sass' uninstall 'node-sass'.
  ✔ Browser application bundle generation complete.
  
  Error: node_modules/ngx-device-detector/index.d.ts:3:23 - error TS2314: Generic type 'ModuleWithProviders&lt;T&gt;' requires 1 type argument(s).
  
  3     static forRoot(): ModuleWithProviders;
                          ~~~~~~~~~~~~~~~~~~~
  node_modules/@ngx-translate/core/public_api.d.ts:22:53 - error TS2314: Generic type 'ModuleWithProviders&lt;T&gt;' requires 1 type argument(s).
  
  22     static forRoot(config?: TranslateModuleConfig): ModuleWithProviders;
                                                         ~~~~~~~~~~~~~~~~~~~
  node_modules/@ngx-translate/core/public_api.d.ts:26:54 - error TS2314: Generic type 'ModuleWithProviders&lt;T&gt;' requires 1 type argument(s).
  
  26     static forChild(config?: TranslateModuleConfig): ModuleWithProviders;
                                                          ~~~~~~~~~~~~~~~~~~~
  </code></pre>
  <p>I really need it, as you can see that some of the packages has <a href="https://next.angular.io/guide/migration-module-with-providers" rel="nofollow noreferrer">old dependency issues</a> which ngcc can solve. I thought that as we are using Ivy, running it will be part of the <code>build</code> by default. I was able to run the command manually as <code>npx ngcc</code>:</p>
  <pre><code>forest@forest:~/....$ npx ngcc
  Compiling @angular/core : fesm2015 as esm2015
  Compiling @angular/animations : fesm2015 as esm2015
  Compiling @angular/compiler/testing : fesm2015 as esm2015
  Compiling @angular/animations : esm2015 as esm2015
  Compiling @angular/animations : main as umd
  Compiling @angular/compiler/testing : esm2015 as esm2015
  Compiling @angular/compiler/testing : main as umd
  Compiling @angular/common : fesm2015 as esm2015
  Compiling @ngx-translate/core : fesm2015 as esm2015
  Compiling @ngx-translate/core : fesm2015 as esm2015
  Compiling @angular/platform-browser : fesm2015 as esm2015
  Compiling @angular/common/http : fesm2015 as esm2015
  Compiling @angular/forms : fesm2015 as esm2015
  
  ...
  
  </code></pre>
  <p>and after that the app runs just as intended:</p>
  <pre><code>ng build
      'node-sass' usage is deprecated and will be removed in a future major version. To opt-out of the deprecated behaviour and start using 'sass' uninstall 'node-sass'.
  ✔ Browser application bundle generation complete.
  ✔ Copying assets complete.
  ✔ Index html generation complete.
                                                                                                                                                          
  Initial Chunk Files | Names         |      Size                                                                                                         
  vendor.js           | vendor        |  14.23 MB                                                                                                         
  main.js             | main          |   4.31 MB                                                                                                         
  styles.css          | styles        | 637.39 kB
  polyfills-es5.js    | polyfills-es5 | 583.94 kB
  polyfills.js        | polyfills     | 148.32 kB
  runtime.js          | runtime       |   6.15 kB
  
                      | Initial Total |  19.88 MB
  
  Build at: 2021-01-26T13:06:31.502Z - Hash: 2340989d60fecfe588df - ....
  </code></pre>
  <p>Something might be blocking it, but I cannot find the root cause. Any ideas what can be the problem?</p>
  <p>My Angular version:</p>
  <pre><code>$ ng version
  
       _                      _                 ____ _     ___
      / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
     / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
    / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
   /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                  |___/
      
  
  Angular CLI: 11.1.1
  Node: 12.3.1
  OS: linux x64
  
  Angular: 11.1.0
  ... animations, common, compiler, compiler-cli, core, forms
  ... language-service, platform-browser, platform-browser-dynamic
  ... router
  Ivy Workspace: Yes
  
  Package                         Version
  ---------------------------------------------------------
  @angular-devkit/architect       0.1101.1
  @angular-devkit/build-angular   0.1101.1
  @angular-devkit/core            8.3.28
  @angular-devkit/schematics      8.3.28
  @angular/cli                    11.1.1
  @angular/http                   7.2.16
  @schematics/angular             8.3.28
  @schematics/update              0.803.28
  rxjs                            6.6.0
  typescript                      4.0.5
  webpack                         4.43.0
  
  </code></pre>
  <p><code>tsconfig.json</code>:</p>
  <pre><code>{
    &quot;compileOnSave&quot;: false,
    &quot;compilerOptions&quot;: {
      &quot;baseUrl&quot;: &quot;./&quot;,
      &quot;module&quot;: &quot;esnext&quot;,
      &quot;outDir&quot;: &quot;./dist/out-tsc&quot;,
      &quot;sourceMap&quot;: true,
      &quot;declaration&quot;: false,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;emitDecoratorMetadata&quot;: true,
      &quot;experimentalDecorators&quot;: true,
      &quot;allowSyntheticDefaultImports&quot;: true,
      &quot;target&quot;: &quot;es5&quot;,
      &quot;typeRoots&quot;: [&quot;node_modules/@types&quot;],
      &quot;lib&quot;: [&quot;es2017&quot;, &quot;dom&quot;],
    }
  }
  </code></pre>
  <p><code>package.json</code>:</p>
  <pre><code>{
    &quot;name&quot;: &quot;eets-frontend&quot;,
    &quot;version&quot;: &quot;1.8.0&quot;,
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
    },
  
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/common&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/compiler&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/core&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/forms&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/http&quot;: &quot;^7.2.16&quot;,
      &quot;@angular/platform-browser&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/router&quot;: &quot;^11.1.0&quot;,
    ...
      &quot;tslib&quot;: &quot;^1.10.0&quot;,
      &quot;zone.js&quot;: &quot;~0.10.2&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;^0.1101.1&quot;,
      &quot;@angular/cli&quot;: &quot;^11.1.1&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;^11.1.0&quot;,
      &quot;@angular/language-service&quot;: &quot;^11.1.0&quot;,
      &quot;@babel/core&quot;: &quot;^7&quot;,
      &quot;@babel/preset-env&quot;: &quot;latest&quot;,
      &quot;@commitlint/cli&quot;: &quot;^8.3&quot;,
      &quot;@commitlint/config-angular&quot;: &quot;latest&quot;,
      &quot;@cypress/code-coverage&quot;: &quot;^1.1&quot;,
      &quot;@cypress/webpack-preprocessor&quot;: &quot;^4.1&quot;,
      &quot;@istanbuljs/nyc-config-typescript&quot;: &quot;^1&quot;,
      &quot;@types/crypto-js&quot;: &quot;^3.1.44&quot;,
      &quot;@types/file-saver&quot;: &quot;^2.0.1&quot;,
      &quot;@types/jasmine&quot;: &quot;^3.5.8&quot;,
      &quot;@types/jasminewd2&quot;: &quot;~2.0.8&quot;,
      &quot;@types/jszip&quot;: &quot;^3.1.7&quot;,
      &quot;@types/lodash&quot;: &quot;^4.14.149&quot;,
      &quot;@types/node&quot;: &quot;^12.11.1&quot;,
      &quot;audit-ci&quot;: &quot;latest&quot;,
      &quot;axe-core&quot;: &quot;^3.4&quot;,
      &quot;babel-loader&quot;: &quot;latest&quot;,
      &quot;babel-plugin-istanbul&quot;: &quot;^6.0&quot;,
      &quot;codecov-json-to-lcov&quot;: &quot;^1.1.1&quot;,
      &quot;codelyzer&quot;: &quot;^5.1.2&quot;,
      &quot;commitlint-config-jira&quot;: &quot;latest&quot;,
      &quot;commitlint-plugin-jira-rules&quot;: &quot;latest&quot;,
      &quot;concurrently&quot;: &quot;^5.2.0&quot;,
      &quot;cypress&quot;: &quot;^4.8.0&quot;,
      &quot;cypress-autorecord&quot;: &quot;^1.1&quot;,
      &quot;cypress-axe&quot;: &quot;^0.6&quot;,
      &quot;cypress-plugin-snapshots&quot;: &quot;^1.2&quot;,
      &quot;datalist-polyfill&quot;: &quot;^1.24.0&quot;,
      &quot;husky&quot;: &quot;^4.2.3&quot;,
      &quot;istanbul-instrumenter-loader&quot;: &quot;^3.0&quot;,
      &quot;istanbul-lib-coverage&quot;: &quot;^3.0&quot;,
      &quot;jasmine-core&quot;: &quot;^3.5.0&quot;,
      &quot;jasmine-spec-reporter&quot;: &quot;~4.2.1&quot;,
      &quot;js-base64&quot;: &quot;^2.5.2&quot;,
      &quot;jsonlint-cli&quot;: &quot;^1.0.1&quot;,
      &quot;karma&quot;: &quot;^5.2.3&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-coverage-istanbul-reporter&quot;: &quot;^2.1.1&quot;,
      &quot;karma-jasmine&quot;: &quot;~3.1.1&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;^1.5.2&quot;,
      &quot;koa&quot;: &quot;^2.12.0&quot;,
      &quot;koa-bodyparser&quot;: &quot;^4.3.0&quot;,
      &quot;koa-router&quot;: &quot;^8.0.8&quot;,
      &quot;koa-static&quot;: &quot;^5.0.0&quot;,
      &quot;lint-staged&quot;: &quot;^10.0.8&quot;,
      &quot;markdownlint-cli&quot;: &quot;^0.22&quot;,
      &quot;ngx-build-plus&quot;: &quot;^8&quot;,
      &quot;node-sass&quot;: &quot;^4.14.1&quot;,
      &quot;nodemon&quot;: &quot;^2.0.4&quot;,
      &quot;nyc&quot;: &quot;^15.0&quot;,
      &quot;pa11y&quot;: &quot;^5&quot;,
      &quot;prettier&quot;: &quot;^2.0.0&quot;,
      &quot;protractor&quot;: &quot;^7.0.0&quot;,
      &quot;protractor-istanbul-plugin&quot;: &quot;^2.0.0&quot;,
      &quot;source-map-support&quot;: &quot;^0.5&quot;,
      &quot;stylelint&quot;: &quot;^13.2.1&quot;,
      &quot;stylelint-config-prettier&quot;: &quot;latest&quot;,
      &quot;stylelint-config-recommended&quot;: &quot;latest&quot;,
      &quot;stylelint-config-recommended-scss&quot;: &quot;latest&quot;,
      &quot;stylelint-scss&quot;: &quot;^3.10&quot;,
      &quot;ts-loader&quot;: &quot;^6.2&quot;,
      &quot;ts-node&quot;: &quot;^8.6&quot;,
      &quot;tslint&quot;: &quot;^6.1.0&quot;,
      &quot;tslint-config-airbnb&quot;: &quot;latest&quot;,
      &quot;tslint-config-prettier&quot;: &quot;latest&quot;,
      &quot;tslint-consistent-codestyle&quot;: &quot;latest&quot;,
      &quot;typescript&quot;: &quot;4.0.5&quot;,
      &quot;wait-on&quot;: &quot;^5.0.0&quot;,
      &quot;webpack&quot;: &quot;^4&quot;,
      &quot;webpack-bundle-analyzer&quot;: &quot;^3.6&quot;
    },
    &quot;resolutions&quot;: {
      &quot;js-base64&quot;: &quot;2.5.2&quot;
    }
  }
  
  </code></pre>