question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type 'IconDefinition' is not assignable to type 'IconProp'

See original GitHub issue

This seems to be a duplicate of #462, but I’ve just updated everything in my project to v6

Versions “@fortawesome/free-brands-svg-icons”: “^6.0.0”, “@fortawesome/free-regular-svg-icons”: “^6.0.0”, “@fortawesome/pro-duotone-svg-icons”: “^6.0.0”, “@fortawesome/pro-light-svg-icons”: “^6.0.0”, “@fortawesome/pro-solid-svg-icons”: “^6.0.0”, “@fortawesome/react-fontawesome”: “^0.1.17”,

The following example given me the error. Is this just a case of the @fortawesome/react-fontawesome package, totally understandably, lagging a few hours behind the 6.0 release of everything else?

import { faSave } from "@fortawesome/pro-light-svg-icons"

function Component() {
  <FontAwesomeIcon icon={faSave} />
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
duhaimecommented, Feb 8, 2022

I needed to replace all my versions with “latest” to please typescript:

    "@fortawesome/free-brands-svg-icons": "latest",
    "@fortawesome/free-regular-svg-icons": "latest",
    "@fortawesome/free-solid-svg-icons": "latest",
    "@fortawesome/fontawesome-svg-core": "latest",
    "@fortawesome/react-fontawesome": "latest",
2reactions
robmadolecommented, Apr 12, 2022

Can you all try upgrading to 6.1.1? I think we’ve got this fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type 'IconDefinition' is not assignable to type 'IconProp' with ...
I'm using typescript and next.js react project. I was trying to import github icon( faGithub ) in fontawesome.
Read more >
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 >
Type 'IconDefinition' is not assignable to type 'IconProp' with ...
I'm using typescript and next.js react project. I was trying to import github icon( faGithub ) in fontawesome.
Read more >
Methods | Font Awesome Docs
iconDefinitions ). Pre-registering icon definitions so that do not have to explicitly pass them to render an icon. Explicitly passing the icon.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found