nebular icon indicating copy to clipboard operation
nebular copied to clipboard

'sticky' is defined as an accessor in class 'CdkColumnDef', but is overridden here in 'NbColumnDefDirective' as an instance property.

Open gershonkoral opened this issue 1 year ago • 6 comments

Issue type

I'm submitting a ... (check one with "x")

  • [ x] bug report
  • [ ] feature request

Issue description

Current behavior: When compiling my Angular project with Angular at v18, I get the error

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

38     sticky: boolean;

Expected behavior: Should not have compilation error.

Steps to reproduce: Import @nebular/theme version 13.0.0 as a module into an angular project of version 18 (latest).

-->

Other information:

npm, node, OS, Browser

<!--
Node, v22.3.0 and npm: v10.8.1
OS: Windows 10
Browser: Firefox
-->

Angular, Nebular

angular: v18.0.4

gershonkoral avatar Jun 21 '24 11:06 gershonkoral

Same problem here

theophane-girard avatar Jun 24 '24 09:06 theophane-girard

@theophane-girard

A temporary fix that worked for me is to directly modify your @nebular/theme module as follows:

  1. Comment out line 38 sticky: boolean property in node_modules/@nebular/theme/components/cdk/table/cell.d.ts
  2. Comment out line 39 sticky: boolean property in node_modules/@nebular/theme/components/cdk/table/row.d.ts
  3. (Optional) Use patch-package to apply these changes for others on your team.

Hope this helps.

gershonkoral avatar Jun 24 '24 09:06 gershonkoral

@theophane-girard

A temporary fix that worked for me is to directly modify your @nebular/theme module as follows:

  1. Comment out line 38 sticky: boolean property in node_modules/@nebular/theme/components/cdk/table/cell.d.ts
  2. Comment out line 39 sticky: boolean property in node_modules/@nebular/theme/components/cdk/table/row.d.ts
  3. (Optional) Use patch-package to apply these changes for others on your team.

Hope this helps.

Imo, that's actually not a good idea and not viable...

for now, i just added this option in tsconfig.json

compilerOptions: {
     // ...
    "skipLibCheck": true
}

theophane-girard avatar Jun 24 '24 11:06 theophane-girard

Same here. I used @theophane-girard solution ---> Thank you for that. I was wondering if this project is going to continue updating, since lately I see it a little abandoned and I don't know I would choose it for future projects, which is a shame since it is very good.

oscarholinger avatar Jul 20 '24 12:07 oscarholinger

Seems to be fixed in the newest version Nebular 14

kisimediaDE avatar Aug 13 '24 08:08 kisimediaDE

skipLibCheck

Updated to Angular 18 and Nebular 14 and seems to be fixed.

Thank you.

oscarholinger avatar Aug 28 '24 17:08 oscarholinger