3

did a regular npm install to 5.0 from 4.0 and this keeps happening `../node_modules/@nebular/theme/components/accordion/accordion-item.component.d.ts:35:9 - error TS1086: An accessor cannot be declared in an ambient context.

35 set disabled(val: boolean); ~~~~~~~~ ../node_modules/@nebular/theme/components/accordion/accordion.component.d.ts:71:9 - error TS1086: An accessor cannot be declared in an ambient context.

71 get multi(): boolean; ~~~~~ ../node_modules/@nebular/theme/components/accordion/accordion.component.d.ts:72:9 - error TS1086: An accessor cannot be declared in an ambient context.

72 set multi(val: boolean); ~~~~~ ../node_modules/@nebular/theme/components/actions/actions.component.d.ts:39:9 - error TS1086: An accessor cannot be declared in an ambient context.

39 get disabled(): boolean; ~~~~~~~~ ../node_modules/@nebular/theme/components/actions/actions.component.d.ts:40:9 - error TS1086: An accessor cannot be declared in an ambient context.

40 set disabled(value: boolean); ~~~~~~~~ ../node_modules/@nebular/theme/components/actions/actions.component.d.ts:139:9 - error TS1086: An accessor cannot be declared in an ambient context. ` ect...

Sevensnake
  • 119
  • 1
  • 2
  • 14
  • i'm getting same error, did you find resolution. It seems that upgrading your typescript version might work, but mine is locked to 3.5.3 because my project is Angular 8 and I can't upgrade to nine just yet – J King Apr 25 '20 at 20:23
  • I'm in the same trouble, did you resolve this @Sevensnake? – Khoa Nguyen May 31 '20 at 11:32
  • Actually I don't find any problems like that on my way so far. Just migrate ang to v9 and nebular to v5.0 then https://update.angular.io/#8.0:9.0l3 – Khoa Nguyen Jun 01 '20 at 02:44

1 Answers1

1

I was facing the same error while building the angular project. However, my scenario was that I created my project with Angular 8 and added nebular in my project using :

ng add @nebular/theme

Obviously, it was not going to run because I had accidentally installed nebular latest version which is 5.0.0. So, what it did, it replaced my @angular/cdk package from 8.0.0 to 9.0.0 which ultimately broke all dependencies.

In order to resolve this I revert back all the changes and installed nebular 4.6.0 which resolved the issue:

ng add @nebular/theme@4.6.0

ARKhan
  • 1,724
  • 22
  • 30