nebular icon indicating copy to clipboard operation
nebular copied to clipboard

angular/[email protected]: [ERROR] TS2610 in NbTable

Open Eugeno opened this issue 1 year ago • 13 comments
trafficstars

Issue type

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

  • [x] bug report
  • [ ] feature request

Issue description

Current behavior:

X [ERROR] TS2610: 'sticky' is defined as an accessor in class 'CdkColumnDef', but is overridden here in 'NbColumnDefDirective' as an instance property. [plugin angular-compiler]

    node_modules/@nebular/theme/components/cdk/table/cell.d.ts:38:4:
      38 │     sticky: boolean;
         ╵     ~~~~~~


X [ERROR] TS2610: 'sticky' is defined as an accessor in class 'CdkHeaderRowDef', but is overridden here in 'NbHeaderRowDefDirective' as an instance property. [plugin angular-compiler]

    node_modules/@nebular/theme/components/cdk/table/row.d.ts:29:4:
      29 │     sticky: boolean;
         ╵     ~~~~~~


X [ERROR] TS2610: 'sticky' is defined as an accessor in class 'CdkFooterRowDef', but is overridden here in 'NbFooterRowDefDirective' as an instance property. [plugin angular-compiler]

    node_modules/@nebular/theme/components/cdk/table/row.d.ts:39:4:
      39 │     sticky: boolean;
         ╵     ~~~~~~

Expected behavior: Process finished with exit code 0

Steps to reproduce: Update @angular/cdk to 17.2.2.

Angular, Nebular

"@nebular/theme": "~13.0.0"

Eugeno avatar Mar 07 '24 08:03 Eugeno

As a workaround I used

"compilerOptions": {
    "skipLibCheck": true
}

in tsconfig.json which allows it to run.

mikejobson avatar Mar 12 '24 10:03 mikejobson

As a workaround I used

"compilerOptions": {
    "skipLibCheck": true
}

in tsconfig.json which allows it to run.

@mikejobson please specify where to add this configuration. Because there are multiple tsconfig files in this project. i have tried adding this configuration at root as well as lib level, but still the error persists.

Afnan7989 avatar Mar 26 '24 11:03 Afnan7989

Issue type

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

  • [x] bug report
  • [ ] feature request

Issue description

Current behavior:

X [ERROR] TS2610: 'sticky' is defined as an accessor in class 'CdkColumnDef', but is overridden here in 'NbColumnDefDirective' as an instance property. [plugin angular-compiler]

    node_modules/@nebular/theme/components/cdk/table/cell.d.ts:38:4:
      38 │     sticky: boolean;
         ╵     ~~~~~~


X [ERROR] TS2610: 'sticky' is defined as an accessor in class 'CdkHeaderRowDef', but is overridden here in 'NbHeaderRowDefDirective' as an instance property. [plugin angular-compiler]

    node_modules/@nebular/theme/components/cdk/table/row.d.ts:29:4:
      29 │     sticky: boolean;
         ╵     ~~~~~~


X [ERROR] TS2610: 'sticky' is defined as an accessor in class 'CdkFooterRowDef', but is overridden here in 'NbFooterRowDefDirective' as an instance property. [plugin angular-compiler]

    node_modules/@nebular/theme/components/cdk/table/row.d.ts:39:4:
      39 │     sticky: boolean;
         ╵     ~~~~~~

Expected behavior: Process finished with exit code 0

Steps to reproduce: Update @angular/cdk to 17.2.2.

Angular, Nebular

"@nebular/theme": "~13.0.0"

tried upgrading @angular/cdk and @angular/core to version 17.2.2 but issue was still not resolved. If any one have a hint regarding this, please let me know

Afnan7989 avatar Mar 27 '24 08:03 Afnan7989

The same problem here after update Angular to v17. Using the following versions:

"@angular/cdk": "^17.3.3",
"@nebular/eva-icons": "^13.0.0",
"@nebular/theme": "^13.0.0",

The following error logs:

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;
       ~~~~~~


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

29     sticky: boolean;
       ~~~~~~


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

39     sticky: boolean;

juninhocruzg3 avatar Apr 09 '24 00:04 juninhocruzg3

I have a same problem

steven274 avatar Apr 10 '24 19:04 steven274

I have the same issue using Angular 17 with Nebular 13. The "skipLibCheck": true workaround seems to work but a fix would be much appreciated.

rokamon1997 avatar Apr 12 '24 07:04 rokamon1997

Something new? I dont want to add "skipLibCheck": true to the app..

oritpersik avatar Apr 17 '24 06:04 oritpersik

I have the same issue too. Just one example: https://github.com/jesperancinha/image-train-filters-web/actions/runs/8750911507/job/24015413573

I will sill use the skipLibCheck trick because my projects are experimental and I will see if the merge requests can automatically continue, but it would be nice to have it fixed.

jesperancinha avatar Apr 19 '24 09:04 jesperancinha

Hello! Any updates on this? I'm currently upgrading to Angular v17 and some legacy components of my app make use of cdk tables, so the "skipLibCheck": true workaround doesn't make it for me.

Would be awesome to have a proper fix for this so we can keep our production projects up to date with Angular!

Thanks a lot!

EOjedaHdez avatar May 20 '24 10:05 EOjedaHdez

Days, is there any news about this bug. I encountered this error in my multi-project with angular v17.

"@angular/cdk": "^17.3.3"
"@angular/core": "^17.1.0"
"@nebular/auth": "^13.0.0"
"@nebular/eva-icons": "^13.0.0"
"@nebular/theme": "^13.0.0"
"eva-icons": "^1.1.3"
✖ Compiling with Angular sources in Ivy partial compilation mode.
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;
       ~~~~~~
node_modules/@nebular/theme/components/cdk/table/row.d.ts:29:5 - error TS2610: 'sticky' is defined as an accessor in class 'CdkHeaderRowDef', but is overridden here in 'NbHeaderRowDefDirective' as an instance property.

29     sticky: boolean;
       ~~~~~~
node_modules/@nebular/theme/components/cdk/table/row.d.ts:39:5 - error TS2610: 'sticky' is defined as an accessor in class 'CdkFooterRowDef', but is overridden here in 'NbFooterRowDefDirective' as an instance property.

39     sticky: boolean;
       ~~~

I have added "skipLibCheck": true in my configuration (tsconfig) and it works, it stops showing the error when I compile but I would really appreciate a solution. 🙏

Thanks a lot

JDavid21051 avatar Jun 13 '24 14:06 JDavid21051

I just bumped my nebular version to "@nebular/eva-icons": "13.0.0" and "@nebular/theme": "13.0.0" and have the same problem. "skipLibCheck": true didnt do it for me :(

Thanks in advance :muscle:

suppadeliux avatar Jul 09 '24 07:07 suppadeliux

Seems to be fixed in the newest version Nebular 14

kisimediaDE avatar Aug 13 '24 08:08 kisimediaDE

I was having the same problem. As pointed out by @kisimediaDE, Nebula 14 does fix it but requires Angular 18. Here are the steps I did to fix it:

  1. Use the flag "skipLibCheck": true while still on Angular 17 (in order for it to work)
  2. Upgrade to Angular 18 and Nebular 14
  3. Remove the flag "skipLibCheck": true from tsconfig.json
  4. Run ng build (everything should work fine)

My tests are running fine and the app is currently in staging phase for review. So far, every Nebular components are working as expected 🤞

softmonkeyjapan avatar Aug 27 '24 22:08 softmonkeyjapan