title: Angular 10 error "Cannot find module '@angular/core' or its corresponding type declarations"
body: <p>I made a project with angular and angular material. Everything worked fine, but i decided to upgrade angular and angular material to v 10, because I needed a date range picker and this is only in the new version of these.
  I made the update, but then when i start <code>ng serve -o</code> the console show me this error:</p>
  <pre><code>ERROR in ../../node_modules/@angular/cdk/overlay/typings/overlay-container.d.ts:8:53 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.
  
  8 import { InjectionToken, OnDestroy, Optional } from '@angular/core';
                                                        ~~~~~~~~~~~~~~~
  ../../node_modules/@angular/cdk/overlay/typings/overlay-container.d.ts:10:25 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.
  
  10 import * as ɵngcc0 from '@angular/core';
  </code></pre>
  <p>i tried cleaning the cache, then install @angular/material and @angular/cdk again. I tried rm -force node_modules... Anything works...So, i need help!</p>
  <p>This is my package.json file:</p>
  <pre><code>{
    &quot;name&quot;: &quot;client&quot;,
    &quot;version&quot;: &quot;0.0.0&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;@angular/animations&quot;: &quot;^10.0.3&quot;,
      &quot;@angular/cdk&quot;: &quot;^10.0.1&quot;,
      &quot;@angular/common&quot;: &quot;~10.0.3&quot;,
      &quot;@angular/compiler&quot;: &quot;~10.0.3&quot;,
      &quot;@angular/core&quot;: &quot;~10.0.3&quot;,
      &quot;@angular/forms&quot;: &quot;~10.0.3&quot;,
      &quot;@angular/localize&quot;: &quot;^10.0.3&quot;,
      &quot;@angular/material&quot;: &quot;^10.0.1&quot;,
      &quot;@angular/material-moment-adapter&quot;: &quot;^10.0.1&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~10.0.3&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~10.0.3&quot;,
      &quot;@angular/router&quot;: &quot;~10.0.3&quot;,
      &quot;@types/jquery&quot;: &quot;^3.5.0&quot;,
      &quot;easytimer.js&quot;: &quot;^4.3.0&quot;,
      &quot;exceljs&quot;: &quot;^4.1.1&quot;,
      &quot;file-saver&quot;: &quot;^2.0.2&quot;,
      &quot;jquery&quot;: &quot;^3.5.1&quot;,
      &quot;moment&quot;: &quot;^2.27.0&quot;,
      &quot;ngx-color-picker&quot;: &quot;^9.1.0&quot;,
      &quot;rxjs&quot;: &quot;~6.6.0&quot;,
      &quot;tslib&quot;: &quot;^2.0.0&quot;,
      &quot;zone.js&quot;: &quot;~0.10.3&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;^0.1000.2&quot;,
      &quot;@angular/cli&quot;: &quot;^10.0.2&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;^10.0.3&quot;,
      &quot;@angular/language-service&quot;: &quot;~10.0.3&quot;,
      &quot;@types/jasmine&quot;: &quot;~3.5.11&quot;,
      &quot;@types/jasminewd2&quot;: &quot;~2.0.3&quot;,
      &quot;@types/node&quot;: &quot;^14.0.23&quot;,
      &quot;codelyzer&quot;: &quot;^6.0.0&quot;,
      &quot;jasmine-core&quot;: &quot;~3.5.0&quot;,
      &quot;jasmine-spec-reporter&quot;: &quot;~5.0.2&quot;,
      &quot;karma&quot;: &quot;^5.1.0&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-coverage-istanbul-reporter&quot;: &quot;~3.0.3&quot;,
      &quot;karma-jasmine&quot;: &quot;~3.3.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;^8.10.2&quot;,
      &quot;tslint&quot;: &quot;~6.1.2&quot;,
      &quot;typescript&quot;: &quot;~3.9.6&quot;
    }
  }
  </code></pre>
  <p>And this is my angular.json file:</p>
  <pre><code>{
    &quot;$schema&quot;: &quot;./node_modules/@angular/cli/lib/config/schema.json&quot;,
    &quot;version&quot;: 1,
    &quot;newProjectRoot&quot;: &quot;projects&quot;,
    &quot;projects&quot;: {
      &quot;client&quot;: {
        &quot;projectType&quot;: &quot;application&quot;,
        &quot;schematics&quot;: {},
        &quot;root&quot;: &quot;&quot;,
        &quot;sourceRoot&quot;: &quot;src&quot;,
        &quot;prefix&quot;: &quot;app&quot;,
        &quot;architect&quot;: {
          &quot;build&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:browser&quot;,
            &quot;options&quot;: {
              &quot;outputPath&quot;: &quot;dist/client&quot;,
              &quot;index&quot;: &quot;src/index.html&quot;,
              &quot;main&quot;: &quot;src/main.ts&quot;,
              &quot;polyfills&quot;: &quot;src/polyfills.ts&quot;,
              &quot;tsConfig&quot;: &quot;tsconfig.app.json&quot;,
              &quot;aot&quot;: false,
              &quot;assets&quot;: [
                &quot;src/favicon.ico&quot;,
                &quot;src/assets&quot;
              ],
              &quot;styles&quot;: [
                &quot;./node_modules/@angular/material/prebuilt-themes/indigo-pink.css&quot;,
                &quot;src/styles.css&quot;
              ],
              &quot;scripts&quot;: [&quot;./node_modules/jquery/dist/jquery.js&quot;]
            },
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;fileReplacements&quot;: [
                  {
                    &quot;replace&quot;: &quot;src/environments/environment.ts&quot;,
                    &quot;with&quot;: &quot;src/environments/environment.prod.ts&quot;
                  }
                ],
                &quot;optimization&quot;: true,
                &quot;outputHashing&quot;: &quot;all&quot;,
                &quot;sourceMap&quot;: false,
                &quot;extractCss&quot;: true,
                &quot;namedChunks&quot;: false,
                &quot;aot&quot;: true,
                &quot;extractLicenses&quot;: true,
                &quot;vendorChunk&quot;: false,
                &quot;buildOptimizer&quot;: true,
                &quot;budgets&quot;: [
                  {
                    &quot;type&quot;: &quot;initial&quot;,
                    &quot;maximumWarning&quot;: &quot;2mb&quot;,
                    &quot;maximumError&quot;: &quot;5mb&quot;
                  },
                  {
                    &quot;type&quot;: &quot;anyComponentStyle&quot;,
                    &quot;maximumWarning&quot;: &quot;6kb&quot;,
                    &quot;maximumError&quot;: &quot;10kb&quot;
                  }
                ]
              }
            }
          },
          &quot;serve&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:dev-server&quot;,
            &quot;options&quot;: {
              &quot;browserTarget&quot;: &quot;client:build&quot;
            },
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;browserTarget&quot;: &quot;client:build:production&quot;
              }
            }
          },
          &quot;extract-i18n&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:extract-i18n&quot;,
            &quot;options&quot;: {
              &quot;browserTarget&quot;: &quot;client:build&quot;
            }
          },
          &quot;test&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:karma&quot;,
            &quot;options&quot;: {
              &quot;main&quot;: &quot;src/test.ts&quot;,
              &quot;polyfills&quot;: &quot;src/polyfills.ts&quot;,
              &quot;tsConfig&quot;: &quot;tsconfig.spec.json&quot;,
              &quot;karmaConfig&quot;: &quot;karma.conf.js&quot;,
              &quot;assets&quot;: [
                &quot;src/favicon.ico&quot;,
                &quot;src/assets&quot;
              ],
              &quot;styles&quot;: [
                &quot;./node_modules/@angular/material/prebuilt-themes/indigo-pink.css&quot;,
                &quot;src/styles.css&quot;
              ],
              &quot;scripts&quot;: [&quot;./node_modules/jquery/dist/jquery.js&quot;
              ]
            }
          },
          &quot;lint&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:tslint&quot;,
            &quot;options&quot;: {
              &quot;tsConfig&quot;: [
                &quot;tsconfig.app.json&quot;,
                &quot;tsconfig.spec.json&quot;,
                &quot;e2e/tsconfig.json&quot;
              ],
              &quot;exclude&quot;: [
                &quot;**/node_modules/**&quot;
              ]
            }
          },
          &quot;e2e&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:protractor&quot;,
            &quot;options&quot;: {
              &quot;protractorConfig&quot;: &quot;e2e/protractor.conf.js&quot;,
              &quot;devServerTarget&quot;: &quot;client:serve&quot;
            },
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;devServerTarget&quot;: &quot;client:serve:production&quot;
              }
            }
          }
        }
      }
    },
    &quot;defaultProject&quot;: &quot;client&quot;
  }
  </code></pre>