由于 Font Awesome 库的影响,我无法构建我的 React 项目。
\n到目前为止,我一直使用带语法的图标<FontAwesomeIcon icon={faPowerOff} />,但是在尝试在 Github 上实现自动构建和部署后,出现以下错误:
Type 'IconDefinition' is not assignable to type 'IconProp'.\n Type 'IconDefinition' is not assignable to type 'IconLookup'.\n Types of property 'iconName' are incompatible.\nRun Code Online (Sandbox Code Playgroud)\n奇怪的是,该图标确实使用此语法和错误进行渲染。
\n使用<FontAwesomeIcon icon={"power-off"} />语法,我不再收到错误,但图标本身根本不渲染。
自项目开始以来我使用的版本:
\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @fortawesome/fontawesome-svg-core@1.3.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @fortawesome/free-solid-svg-icons@5.15.4 \n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @fortawesome/react-fontawesome@0.1.17\nRun Code Online (Sandbox Code Playgroud)\n有人知道如何解决这个问题吗?
\n