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
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.
I have the same issue in an Agular 10.1 project.
I'm using typescript 4.0.2
Same issue too in an Angular 10 project.
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
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.
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.
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+.
Most helpful comment
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.
But I am not sure this will work in the future
Thanks.