inorganik / countUp.js

Animates a numerical value by counting to it
https://inorganik.github.io/countUp.js
MIT License
8.03k stars 1.38k forks source link

Does not build with recent Angular 2 versions #154

Closed lukaszsamson closed 7 years ago

lukaszsamson commented 7 years ago

tested on Angular 2.4.9, typescript 2.0.10 with webpack JIT compile

inorganik commented 7 years ago

@vigie ?

jculverwell commented 7 years ago

I am getting this too. Using the latest verison on the angular-cli I am getting this warning:

WARNING in ./~/countup.js/dist/countUp.module.js 15:24-31 Critical dependency: require function is used in a way in which dependencies cannot be staticall y extracted

jculverwell commented 7 years ago

I suspect this maybe something to do with the Angular-CLI switching to AOT by default

japalo commented 7 years ago

Any ways of fixing this? I am having the same issue. I am using angular-cli.

vigie commented 7 years ago

I'll try to have a look at the angular-cli use case this week. Other eyes on this also very welcome.

hughred22 commented 7 years ago

I am having this issue as well. Please help to get this working again. Thanks!

KevinBeckers commented 7 years ago

Same issues

inorganik commented 7 years ago

hey community, can I get your help on this one? I do not use webpack currently on any projects. Can someone please troubleshoot this and make a fix, and then create a pull request?

Seems like you'd be helping a lot of folks out.

japalo commented 7 years ago

Would very much love to, but i sadly lack the knowledge. If we do have white knight among us that can have a go at it and finds the solution i would very much appreciate to discuss what the solution is.

alexreynier commented 7 years ago

Has anyone figured this out by any chance? :-)

fisherspy commented 7 years ago

same issue

inorganik commented 7 years ago

@vigie :D

yanai101 commented 7 years ago

same issue

AndreasGassmann commented 7 years ago

I have the same error and tried to get it working for quite some time, but sadly I wasn't successful. Did anyone find a workaround?

japalo commented 7 years ago

@AndreasGassmann I ended up using a different package :(

AndreasGassmann commented 7 years ago

I'm using https://github.com/izupet/angular2-counto now, but it just doesn't look as nice as this package :(.

inorganik commented 7 years ago

Sorry to hear this issue hasn't been resolved yet. Has anyone actually tried to fix it?

I've not yet dove into the world of Angular 2 and typescript. But if someone could please link me a zip of a sample project I could try to troubleshoot. I'm sure this is something simple... it just needs some attention.

cbaxter713 commented 7 years ago

I'm having the same exact issue. Any updates?

Getting this error as well from the angular-cli: WARNING in ./~/countup.js/dist/countUp.module.js 15:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

brookstudio commented 7 years ago

@cbaxter713 Same issue for me. But I make a not smart change on the countUp.module.ts just copy the code of declaration of CountUp from countUp.js into it and replace the "declare var CountUp". Now it work for me. here is the repo https://github.com/brookstudio/countUp.js and demo source here https://github.com/brookstudio/countUpDemo. check the demo here https://github.com/brookstudio/countUpDemo

inorganik commented 7 years ago

Hi all. Great news! The Angular 2 module for CountUp.js has moved into its own repo as of v1.9.0.

It has it's own npm package now as well, countup.js-angular2.

Please make sure you update your projects, and please test to make sure I properly set it up. I'm not currently using angular ^2 so I have not tested yet. Feel free to make any PRs necessary over there and I'll merge them ASAP.

Closing this issue, as this repo no longer contains angular 2 files.

jculverwell commented 7 years ago

Thank you, much appreciated

On Thu, Aug 24, 2017 at 9:19 AM, Jamie Perkins notifications@github.com wrote:

Hi all. Great news! The Angular 2 module for CountUp.js has moved into its own repo https://github.com/inorganik/countUp.js-angular2 as of v1.9.0.

It has it's on npm package now as well, countup.js-angular2.

Please make sure you update your projects, and please test to make sure I properly set it up. I'm not currently using angular ^2 so I have not tested yet. Feel free to make any PRs necessary over there and I'll merge them ASAP.

Closing this issue, as this repo no longer contains angular 2 files.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/inorganik/countUp.js/issues/154#issuecomment-324489242, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfqUsI9SIP1VxaNV6_5EnQ31Y5s3jdRks5sbLOUgaJpZM4Md5L- .