Search code examples
angularng-zorro-antd

Getting error when adding ng-zorro-antd with cli in angular 8 ng add ng-zorro-antd


Having this issue when adding ng-zorro-antd with cli in angular 8. Followed the steps:

  1. ng new PROJECT_NAME
  2. cd PROJECT_NAME
  3. ng add ng-zorro-antd

My Configurations are:

Angular CLI: 7.2.1
Node: 10.15.3
OS: win32 x64
@angular-devkit/architect    0.12.1 (cli-only)
@angular-devkit/core         7.2.1 (cli-only)
@angular-devkit/schematics   7.2.1 (cli-only)
@schematics/angular          7.2.1 (cli-only)
@schematics/update           0.12.1 (cli-only)

Solution

  • Resolved by following these steps:

    npm update @angular/cli @angular/cdk rxjs
    npm install -S @angular/material @angular/cdk @angular/animations
    npm uninstall @angular/core
    npm install -S @angular/core
    

    and after this changing module:"es2015" to module:"esnext" in tsconfig.json by