FortAwesome / angular-fontawesome

Official Angular component for Font Awesome 5+
https://fontawesome.com
MIT License
1.49k stars 152 forks source link

Unsolved error #370

Closed JuanFdezAlvaC closed 2 years ago

JuanFdezAlvaC commented 2 years ago

error TS2322: Type 'IconDefinition' is not assignable to type 'IconProp'. Type 'IconDefinition' is not assignable to type 'IconLookup'. Types of property 'iconName' are incompatible. Type 'import("C:/Programacion/Paginmas-Web/ServerManager/node_modules/@fortawesome/fontawesome-common-types/index").IconName' is not assignable to type 'import("C:/Programacion/Paginmas-Web/ServerManager/node_modules/@fortawesome/fontawesome-svg-core/node_modules/@fortawesome/fontawesome-common-types/index").IconName'. Type '"repeat-1-alt"' is not assignable to type 'IconName'. Did you mean '"repeat1-alt"'?

42 <fa-icon [icon]="faCircle" class="cl" [ngClass]="errors.stado ? 'cl-v' : 'cl-r'">

devoto13 commented 2 years ago

Do you happen to install @fortawesome/fontawesome-svg-core@1.3.0/6.x (which is deprecated as it was incorrectly released with the breaking changes/is for the FA v6) with the @fortawesome/pro-X-svg-icons@5.x (which is for the FA v5)? If so, please stick with the @fortawesome/fontawesome-svg-core@1.2.x. Otherwise, please provide the minimal reproduction, so I can point out the exact error.

@robmadole Also FYI information as it seems that @fortawesome/fontawesome-common-types@6.1.1 contains repeat1-alt in the index.d.ts, but @fortawesome/pro-solid-svg-icons@6.1.1 has repeat-1-alt as an alias in the faArrowsRepeat1.js. Note the missing dash in the name. I think the d.ts file needs to be updated to include it for compatibility with v5 and correctness.

devoto13 commented 2 years ago

Hope you were able to resolve your problem by now. If you still experience the problem and believe that there is a bug in angular-fontawesome, please provide a minimal reproduction we can look at.

robmadole commented 2 years ago

@devoto13 yuck. I'll take a look at repeat1-alt and we'll get that fixed. Thanks for the heads-up.

Dennis-Do commented 1 year ago

Same isssue here. Any update on this?