akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.04k stars 1.51k forks source link

Compilation error after adding nebular to angular 10 app #2501

Closed emmanuelagarry closed 3 years ago

emmanuelagarry commented 3 years ago

I get an error after adding the Nebular theme to my angular app with the schematic command ng add @nebular/theme


    ERROR in node_modules/@nebular/theme/components/cdk/table/cell.d.ts:35:5 - error TS2610: 'name' is defined as an accessor in class 'CdkColumnDef', but is overridden here in 'NbColumnDefDirective' as an instance property.

    35     name: string;
           ~~~~
    node_modules/@nebular/theme/components/cdk/table/cell.d.ts:39:5 - error TS2610: 'stickyEnd' is defined as an accessor in class 'CdkColumnDef', but is overridden here in 'NbColumnDefDirective' as an instance property.

    39     stickyEnd: boolean;
           ~~~~~~~~~
    node_modules/@nebular/theme/components/tree-grid/tree-grid-def.component.d.ts:19:9 - error TS2611: 'columns' is defined as a property in class 'NbRowDefDirective<T>', but is overridden here in 'NbTreeGridRowDefDirective<T>' as an accessor.

    19     set columns(value: Iterable<string>);
               ~~~~~~~
    node_modules/@nebular/theme/components/tree-grid/tree-grid-def.component.d.ts:34:9 - error TS2611: 'columns' is defined as a property in class 'NbHeaderRowDefDirective', but is overridden here in 'NbTreeGridHeaderRowDefDirective' as an accessor.

    34     set columns(value: Iterable<string>);
               ~~~~~~~
    node_modules/@nebular/theme/components/tree-grid/tree-grid-def.component.d.ts:49:9 - error TS2611: 'columns' is defined as a property in class 'NbFooterRowDefDirective', but is overridden here in 'NbTreeGridFooterRowDefDirective' as an accessor.

    49     set columns(value: Iterable<string>);
               ~~~~~~~

Here is my system and CLI configuration


   _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 10.1.0
Node: 12.18.2
OS: darwin x64

Angular: 10.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1001.0
@angular-devkit/build-angular     0.1001.0
@angular-devkit/build-optimizer   0.1001.0
@angular-devkit/build-webpack     0.1001.0
@angular-devkit/core              10.1.0
@angular-devkit/schematics        10.1.0
@angular/cdk                      10.2.0
@ngtools/webpack                  10.1.0
@schematics/angular               10.1.0
@schematics/update                0.1001.0
rxjs                              6.6.2
typescript                        4.0.2
webpack                           4.44.1
AshotAleqs commented 3 years ago

I got the same errors. I just came to add the new issue but saw you already had this added.

The current workaround is:

Downgrade the typescript and tslint versions.

    "tslint": "~5.15.0",
    "typescript": "~3.9.3"

But I am not sure this will work in the future

Thanks.

Szoradi commented 3 years ago

I have the same issue in an Agular 10.1 project. I'm using typescript 4.0.2

mkubdev commented 3 years ago

Same issue too in an Angular 10 project.

jc0d3d3v commented 3 years ago

Typescript4.0 is not supported in Angular10.X version yet, It's supported since Angular11.0. So, Downgrade from Typesciprt 4.x to ~3.9.X

LeilaMoussa commented 3 years ago

I too had compilation errors related to nebular after upgrading to Angular 10. Downgrading tslint from 6.1.0 to 5.15.0 and typescript from 4.0.2 to 3.9.4 did the trick!! Thank you.

softgandhi commented 3 years ago

I am also getting the same issue while upgrading to angular 10. Downgrading tslint to 5.15.0 and typescript 3.9.7 worked!! Hope to get the fix for the same for the latest version of typescript and tslint soon. Thanks.

yggg commented 3 years ago

Duplicate of #2498. Version 6.2.0 with TypeScript 4 support is available on npm. Please note, you also need to update @angular/cdk to versions 10.2.1+.

maks-humeniuk commented 2 years ago

For those, who need a hotfix, add this to tsconfig.json:

{
  "compilerOptions": {
    "skipLibCheck": true
  }
}
mkubdev commented 2 years ago

@Halfist thanks!

patsonkaushik commented 1 year ago

@Halfist thanks

Afnan7989 commented 3 months ago

I got the same errors. I just came to add the new issue but saw you already had this added.

The current workaround is:

Downgrade the typescript and tslint versions.

    "tslint": "~5.15.0",
    "typescript": "~3.9.3"

But I am not sure this will work in the future

Thanks.

now i am using angular 17 with ts version 5. it was set in dev dependencies by default. so i am assuming that, downgrading ts version will cause major version conflicts and might possibly break the program