question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while building project : An accessor cannot be declared in an ambient context

See original GitHub issue

First of all Thank you for a great plugin, really appropriate it. I had an issue with 13.0.2 Version where I was getting Kind of undefined as an error while trying prod build. So I checked for it and found a new version released. I Updated the project and got a new error as below.

Error in Console ERROR in node_modules/@swimlane/ngx-charts/lib/bar-chart/bar.component.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/legend/legend-entry.component.d.ts(11,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/tooltip/tooltip.component.d.ts(19,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/tooltip/tooltip.directive.d.ts(30,17): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/tooltip/tooltip.directive.d.ts(31,17): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/count/count.directive.d.ts(17,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/count/count.directive.d.ts(18,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/count/count.directive.d.ts(19,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/count/count.directive.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/count/count.directive.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/count/count.directive.d.ts(22,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/svg-radial-gradient.component.d.ts(9,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/common/svg-radial-gradient.component.d.ts(10,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/number-card/number-card.component.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/pie-chart/pie-label.component.d.ts(19,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/pie-chart/pie-label.component.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/pie-chart/pie-label.component.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/pie-chart/pie-label.component.d.ts(22,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@swimlane/ngx-charts/lib/pie-chart/pie-label.component.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.

Would really appreciate if I get solution on it 👍

ngx-charts version 13.0.3 ERROR IN BUILDING CHARTS

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
vikrecommented, Apr 15, 2020

12.1.0 Works fine with angular 8 if you guys are running 8 😃 Had the same problem installing latest 13.0.3, but downgrading to 12.1.0 did the trick for now.

3reactions
vikrecommented, Apr 16, 2020

@pranavghate30 Try specifying the version to be 11.2.0 - since in the changelog it says that >= 12 is angular 8, and >= 13 is angular 9.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TS1086: An accessor cannot be declared in ambient context
I got the same issue when adding @angular/flex-layout to my Angular 8 project now with `npm install @angular/flex-layout --save`.
Read more >
Fixing accessor cannot be declared in an ambient context error
Fixing accessor cannot be declared in an ambient context error in Angular Animations project with Ionic 4 and Angular 8.
Read more >
An accessor cannot be declared in an ambient context · Issue ...
i'm using angular 8.3.20 and typescript 3.5.3. And i got same error when try to build the project.
Read more >
Angular 7 (An accessor cannot be declared in an ambient ...
I'm quite new to Angular and when I try to build --prod my angular apps ... Angular 7 (An accessor cannot be declared...
Read more >
Angular build errors - Material Design for Bootstrap
p>When trying to build or serve my angular application, the console outputs the ... error TS1086: An accessor cannot be declared in an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found