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.05k stars 1.51k forks source link

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

Open gershonkoral opened 3 months ago

gershonkoral commented 3 months ago

Issue type

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

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
theophane-girard commented 3 months ago

Same problem here

gershonkoral commented 3 months ago

@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.

theophane-girard commented 3 months ago

@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
}
oscarholinger commented 2 months ago

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.

kisimediaDE commented 1 month ago

Seems to be fixed in the newest version Nebular 14

oscarholinger commented 1 month ago

skipLibCheck

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

Thank you.