-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type 'IconDefinition' is not assignable to type 'IconProp' with Typescript #462
Comments
@everettglovier please upgrade |
It seems that The following setup make the
And this one works fine:
|
I was encountering this issue as well. This exact version combo worked for me:
|
* pin Puppeteer for Chromium 98 again as per readme notes * downgrade `@fortawesome/fontawesome-svg-core` for now – see FortAwesome/react-fontawesome#462 (comment) re breaking change in 1.3.0
I am having the same issue with these versions:
and
shows
|
Try to update "@fortawesome/free-solid-svg-icons" to version 6.0.0. It works for me. |
This bug is identical to #366 - except it's happening with the pro icons. When attempting to use the below code with TypeScript and Next.js:
import {faUser} from '@fortawesome/fontawesome-pro-light'
export default function Navigation({}) {
return <FontAwesomeIcon icon={faUser}>
}
Typescript throws an error: Type 'IconDefinition' is not assignable to type 'IconProp' with Typescript. This does not happen with the free icons.
Version
A hacky workaround
import {faUser} from '@fortawesome/fontawesome-pro-light'
export default function Navigation({}) {
return <FontAwesomeIcon icon={faUser as IconProp}>
}
The text was updated successfully, but these errors were encountered: