Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error after adding nebular to angular 10 app #2501

Closed
emmanuelagarry opened this issue Sep 7, 2020 · 11 comments · Fixed by #2523
Closed

Compilation error after adding nebular to angular 10 app #2501

emmanuelagarry opened this issue Sep 7, 2020 · 11 comments · Fixed by #2523

Comments

@emmanuelagarry
Copy link

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
Copy link

AshotAleqs commented Sep 7, 2020

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
Copy link

Szoradi commented Sep 9, 2020

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

@mkubdev
Copy link

mkubdev commented Sep 9, 2020

Same issue too in an Angular 10 project.

@jc0d3d3v
Copy link

jc0d3d3v commented Sep 16, 2020

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
Copy link

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
Copy link

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
Copy link
Contributor

yggg commented Sep 25, 2020

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
Copy link

maks-humeniuk commented Nov 4, 2021

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

{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

@mkubdev
Copy link

mkubdev commented Nov 4, 2021

@Halfist thanks!

@patsonkaushik
Copy link

@Halfist thanks

@Afnan7989
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.