crisbeto / angular-svg-round-progressbar

Angular module that uses SVG to create a circular progressbar
https://crisbeto.github.io/angular-svg-round-progressbar/
MIT License
741 stars 173 forks source link

Errors with Angular 9 - ɵɵFactoryDef #210

Closed gvlekke closed 3 years ago

gvlekke commented 3 years ago

Upgraded to Angular 9 I get this errors when I upgraded the angular-svg-round-progressbar to version 4.0.0

Is angular-svg-round-progressbar compatible with angular 9? and how can I solve this then?



63     static ɵfac: i0.ɵɵFactoryDef<RoundProgressComponent, never>;
                       ~~~~~~~~~~~~
../node_modules/angular-svg-round-progressbar/dist/round-progress.component.d.ts:64:18 - error TS2314: Generic type 'ɵɵComponentDefWithMeta' requires 6 type argument(s).

64     static ɵcmp: i0.ɵɵComponentDefWithMeta<RoundProgressComponent, "round-progress", never, { "current": "current"; "max": "max"; "radius": "radius"; "animation": "animation"; "animationDelay": "animationDelay"; "duration": "duration"; "stroke": "stroke"; "color": "color"; "background": "background"; "responsive": "responsive"; "clockwise": "clockwise"; "semicircle": "semicircle"; "rounded": "rounded"; }, { "onRender": "onRender"; }, never, never>;
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/angular-svg-round-progressbar/dist/round-progress.ease.d.ts:34:21 - error TS2694: Namespace '"/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.

34     static ɵfac: i0.ɵɵFactoryDef<RoundProgressEase, never>;
                       ~~~~~~~~~~~~
../node_modules/angular-svg-round-progressbar/dist/round-progress.service.d.ts:31:21 - error TS2694: Namespace '"<path>/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.

31     static ɵfac: i0.ɵɵFactoryDef<RoundProgressService, [{ optional: true; }]>;
                       ~~~~~~~~~~~~```
DuncanFaulkner commented 3 years ago

I faced a similar issue when I upgraded to version 10 of Angular, I had to roll back to version 3.0.1 of the library, it does throw a warning about bailing out when optimising, but so far it seems to work. I have submitted a PR (build-cleanup) which converted this library over to use the ng add schema and I'm waiting for @crisbeto to take it over the finishing line. This should then remove this error, I think this error is partly due the the build process and possibly commonJS issues but I'm not entirely sure about that.

crisbeto commented 3 years ago

These errors usually mean that ngcc hasn't been run over the project's dependencies.

gvlekke commented 3 years ago

@crisbeto good temporary fix but would be great if this library is supporting that.

Hope @DuncanFaulkner pr fixes it soon, altho I don't see his PR

crisbeto commented 3 years ago

His changes are in the build-cleanup branch, but there's still some more work to be done.

gvlekke commented 3 years ago

ah ok its still in the branch :) good luck and if you need some help testing give me a message.

DuncanFaulkner commented 3 years ago

@crisbeto if there is anything I can help with to get this over the line?

crisbeto commented 3 years ago

I'm really sorry that I didn't get to it, I had some time off the past couple of weeks but other things got in the way. What's holding it back is that I need to go through everything (production build, demo, GH pages deployment) and make sure that it works similarly to the current setup.

DuncanFaulkner commented 3 years ago

No problem, we all need time to recharge the batteries, if it helps the process, the production code hasn't changed just the location of it (I don't recall making any changes to the code, but of course it still needs validating).

The new part was the creation of the ng add schema which will need full testing, and there may very well be bugs in that part.

The demo is just a regular angular app pulling in the component from library, I wasn't sure (at the time) how you were deploying it to GH pages and there will probably be some work to do here.

If there is anything I can help with please let me know.

crisbeto commented 3 years ago

Version 5.0.1 has been release which includes the new packaging changes.

DuncanFaulkner commented 3 years ago

@crisbeto this is excellent news