title: Uncaught Error: JIT compiler unavailable in Angular 12
body: <p>For a few days I have a problem with a certain error: Uncaught Error: JIT compiler unavailable.
  After upgrading angular from version 8 to 12 there was a
  problem that I run the ng build --prod --output-path = dist command and
  build Angular I have no problems, but when I start the page, this problem with JIT pops up.
  I have tried all the solutions from stack overflow like I add in my package.json</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>scripts{
   "postinstall": "ngcc --properties es5 browser module main --first-only"
  }</code></pre>
  </div>
  </div>
  </p>
  <p>I add in main.ts '@angular/compiler'
  Also in tsconfig.json in &quot;angularCompilerOptions&quot; I changed  &quot;enableIvy&quot; to true
  One post says to change to true, the other that to false, but none of these solutions work for me.
  I reinstall node_modules couple of times and adding couple of dependecies but nothing really worked.
  This is my tsconfig file:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "compileOnSave": false,
    "compilerOptions": {
      "baseUrl": "./",
      "outDir": "./dist/out-tsc",
      "sourceMap": true,
      "declaration": false,
      "downlevelIteration": true,
      "experimentalDecorators": true,
      "module": "es2020",
      "moduleResolution": "node",
      "importHelpers": true,
      "resolveJsonModule": true,
      "target": "es5",
      "skipLibCheck": true, 
      "typeRoots": [
        "node_modules/@types"
      ],
      "lib": [
        "es2015",
        "dom"
      ],
      "paths": {
        // "tslib": ["../frontend/node_modules/tslib/tslib.d.ts"]
      }
    },
    "angularCompilerOptions": {
      "fullTemplateTypeCheck": true,
      "strictInjectionParameters": true,
      "enableIvy": true,
    }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>In my package.json i add this line of code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>"scripts": {
      "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"
  }</code></pre>
  </div>
  </div>
  </p>
  <p>In angular.json i changed aot: true, and buildOptimizer: false but it didin't change anything at all.
  In this post &quot;https://stackoverflow.com/questions/68798086/jit-compiler-unavailable-after-angular-update&quot; there is answer
  about changing Webpack configuration. But we dont use webpack so i dont really understand this.
  Can you help with this issue?</p>