Nemus
Nemus

Reputation: 1482

Angular/material crash after update to 9.2.4

Today I've updated Angular/material to 9.2.4 from 9.2.0-next, and after ng serve I've got this:

platform.js:78 Uncaught TypeError: Class constructor Platform cannot be invoked without 'new'
    at Module../node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/platform.js (platform.js:78)
    at __webpack_require__ (bootstrap:84)
    at Module../node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/a11y.js (a11y.js:1)
    at __webpack_require__ (bootstrap:84)
    at Module../node_modules/@angular/material/__ivy_ngcc__/fesm2015/core.js (core.js:1)
    at __webpack_require__ (bootstrap:84)
    at Module../node_modules/@angular/material/__ivy_ngcc__/fesm2015/icon.js (icon.js:1)
    at __webpack_require__ (bootstrap:84)
    at Module../src/app/home/home.component.ts (home.component.ts:1)
    at __webpack_require__ (bootstrap:84)

Tried to delete node_modules folder and reinstall it, what can I do?

ng --version

Angular CLI: 9.1.8 Node: 12.8.1 OS: win32 x64

Angular: 9.1.11 ... animations, common, compiler, compiler-cli, core, forms ... language-service, localize, platform-browser ... platform-browser-dynamic, router, service-worker Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------ 
@angular-devkit/architect          0.901.8

@angular-devkit/build-angular      0.901.8 

@angular-devkit/build-optimizer    0.901.8 

@angular-devkit/build-webpack      0.901.8 

@angular-devkit/core           9.1.8 

@angular-devkit/schematics         9.1.8 

@angular/cdk                       10.0.0-rc.1-sha-a3dabc93d 

@angular/cli                       9.1.8 

@angular/material                  9.2.4 

@angular/material-moment-adapter   9.2.4 

@ngtools/webpack                 9.1.8 

@schematics/angular                9.1.8 

@schematics/update                 0.901.8 

rxjs                               6.5.5 

typescript                         3.7.5 

webpack                            4.42.0

ts.config

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "module": "esnext",
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ]
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true,
    "allowSyntheticDefaultImports": true
  }
}

ts.config.app

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "types": []
  },
  "files": [
    "src/main.ts",
    "src/polyfills.ts"
  ],
  "include": [
    "src/**/*.d.ts"
  ],
  "exclude": [
    "src/test.ts",
    "src/**/*.spec.ts"
  ]
}

Upvotes: 0

Views: 1611

Answers (1)

Nemus
Nemus

Reputation: 1482

Solved by updating @angular/cdk to 9.2.4 too (ot was stucked to github:angular/cdk-builds), then re-installed everything with a clean npm i

Upvotes: 1

Related Questions