Argument of type 'IconPack' is not assignable to parameter of type 'IconDefinitionOrPack'
See original GitHub issueDescribe the problem
Trying to import fab icons to angular project, but cli says there’s the following error:
error TS2345: Argument of type 'IconPack' is not assignable to parameter of type 'IconDefinitionOrPack'. Type 'IconPack' is missing the following properties from type 'IconDefinition': icon, prefix, iconName
Issue Analytics
- State:
- Created 5 years ago
- Comments:33 (3 by maintainers)
Top Results From Across the Web
Argument of type 'IconDefinition' is not assignable to ...
On build (npm start) it produces error/warning Argument of type 'IconDefinition' is not assignable to parameter of type 'IconDefinitionOrPack'.
Read more >(typescript) facing problem trying to pass font-awsome icon as ...
Error: Type 'object' is not assignable to type 'IconProp'. Type 'object' is not assignable to type '[IconPrefix, IconName]'.ts(2322) ...
Read more >User user3856437 - Stack Exchange
Argument of type 'IconDefinition' is not assignable to parameter of type 'IconDefinitionOrPack' · angular6 font-awesome asked Oct 30, 2018 at 14:51.
Read more >[fontawesome] Argument of type 'IconPack' is not assignable ...
Argument of type 'IconPack' is not assignable to parameter of type 'IconDefinitionOrPack' · Issue #125 · FortAwesome/angular-f.
Read more >@fortawesome/fontawesome-common-types - npm
@fortawesome/fontawesome-common-types. TypeScript icon, indicating that this package has built-in type declarations.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had the problem too, the solution was to add a missing import-statement.
So the issue seems to be that you ended up having two instances of
@fortawesome/fontawesome-common-typesof different versions installed.Can you first try to open your
package-lock.json/yarn.lockand search for"@fortawesome/fontawesome-common-types": {? Does it find more than one result? If so try changing@fortawesome/fontawesome-svg-coreto^1.2.12and runningnpm installto force it to update and de-duplicate?