93Alliance / ng-chartjs

A fully functional Angular2+ chart.js library.
https://93alliance.github.io/ng-chartjs/
MIT License
87 stars 10 forks source link

ERROR: An accessor cannot be declared in an ambient context. #12

Closed edmilsonlani closed 4 years ago

edmilsonlani commented 4 years ago

ERROR in node_modules/ng-chartjs/lib/ng-chartjs.directive.d.ts:42:9 - error TS1086: An accessor cannot be declared in an ambient context.

42 get chart(): Chart;

[13:07:02] Angular CLI: 8.3.26 [13:07:02] Node: 12.16.2 [13:07:02] OS: win32 x64 [13:07:02] Angular: 8.1.3 [13:07:02] ... animations, common, compiler, compiler-cli, core, forms [13:07:02] ... language-service, platform-browser, platform-browser-dynamic [13:07:02] ... router [13:07:02]
[13:07:02] Package Version [13:07:02] ----------------------------------------------------------- [13:07:02] @angular-devkit/architect 0.801.3 [13:07:02] @angular-devkit/build-angular 0.801.3 [13:07:02] @angular-devkit/build-optimizer 0.801.3 [13:07:02] @angular-devkit/build-webpack 0.801.3 [13:07:02] @angular-devkit/core 8.1.3 [13:07:02] @angular-devkit/schematics 8.3.26 [13:07:02] @angular/cli 8.3.26 [13:07:02] @ngtools/webpack 8.1.3 [13:07:02] @schematics/angular 8.3.26 [13:07:02] @schematics/update 0.803.26 [13:07:02] rxjs 6.4.0 [13:07:02] typescript 3.4.5 [13:07:02] webpack 4.35.2

93Alliance commented 4 years ago

What version of ng-chartjs are you using?

edmilsonlani commented 4 years ago

The version is: "ng-chartjs": "^0.1.8".

93Alliance commented 4 years ago

https://stackblitz.com/edit/angular-ngchartjs-bar-chart,I can't find this problem.

93Alliance commented 4 years ago

I will remove the get chart(): Chart function and the problem should be solved.

You need updated ng-chartjs to version 0.1.9

Or you can upgrade the angular 9.

edmilsonlani commented 4 years ago

It worked!

Thank you very much for the quick support!