-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function #1117
Comments
The same issue |
i think it like #1115. |
Hi, I have ng chart in production and I am facing the same issue. Can somebody suggest for solutions asap. |
with me, i edit code in |
same error. |
i am also facing this error. anyone got the solution? |
same issue here too.any appropriate fix aside editing ɵɵdefineInjectable in library? |
i used the older release 2.2.0 and the issue is not coming there. earlier i was using 2.2.4 version. I have not tried 2.2.5. |
I just realized any version <=2.2.3 works. |
2.2.5 works for me. |
|
I agree with @tranvannhat , I also edit the code in ./node_modules/ng2-charts/fesm5/ng2-charts.js and replace ɵɵdefineInjectable to defineInjectable and it's working fine. ng2-chart team can you update this? As we are using this lib in prod and while building on prod I cannot push my local lib. it will fetch from repo. For me issue is with Angular 7. |
As a few folks have noted, I was able to update to v2.2.5 and this issue was fixed in an Angular 7 project:
The error popped up after there was a change to build this project (ng2-charts) with Angular 8. That change was reverted with Release v2.2.5: https://github.com/valor-software/ng2-charts/releases/tag/2.2.5 v2.3.0 has been upgraded to use Angular 8 or Angular 7 (so it should - in theory - also work): ec5e603#diff-e86dda6566477895fbf685c476288762 Angular's official repo has an issue on this type of error if you're interested: angular/angular#30413 |
@bryplano I've just updated ng2-charts to v2.3.0 on an Angular 8 project and this error popped up as well. |
@rcrodrigues thanks for checking! Shame the change broke this (and other) libs, but it sounds like it's intended per this post: angular/angular#30413 (comment)
Guess sticking at 2.2.5 is currently advisable @rcrodrigues :\ |
For those interested, upgrading my app to Angular As indicated in the helpfully linked angular/angular#30413, this issue was caused by compiling this library using the Angular v8 compiler. Libraries which support either Angular
cc: @bryplano - pinging you because it sounds like you might be interested to know that ng2-charts |
I am also facing the same issue I upgrade to 2.2.5 ng serve works fine but ng build it is showing the same error "Uncaught TypeError: Object(...) is not a function" any one help asap. |
Curious - why are you using an older version? Current version is 2.4.2 |
I just created a fresh angular app using Stackblitz example https://stackblitz.com/edit/ng2-charts-angular-8 |
i am getting ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function while implementing ng2-charts. I tried with Below versions but nothing is helping. Thanks in advance. |
Reproduction of the problem
ng2-charts is a port & modification of Chart.js component for Angular 2. Sometimes the issue is related to Chart.js instead of ng2-charts.
To confirm, if the issue shows in a pure Chart.js project, it is an issue of Chart.js.
Pure Chart.js starting template: https://jsfiddle.net/Hongbo_Miao/mvct2uwo/3/
If the issue does not show in a pure Chart.js project and shows in an
the ng2-charts project, please try to provide a minimal demo of the problem.
ng2-charts starting template: http://plnkr.co/edit/Ka4NXG3pZ1mXnaN95HX5?p=preview
The text was updated successfully, but these errors were encountered: