简体   繁体   English

图标未从 react-icons 导出,并显示编译器错误

[英]Icon is not exported from react-icons and compiler error is shown

I installed react-icons but it is not working我安装了 react-icons 但它不工作

error: FaBeer not exported错误:FaBeer 未导出

import '../style/mobHeader.css'
import { FaBeer } from 'react-icons/fa';
const Mobileheader = () => {
    return (
        <div className="mob-header">
            <h3>LoremIPSUM</h3>
            <h3>LoremIPSUM </h3>
            <FaBeer />
   
        </div>
    );
}```

Been having this problem since yesterday too.从昨天开始也有这个问题。 Seems to be something to do with the newest version (v4.3.0).似乎与最新版本(v4.3.0)有关。

You can install the previous version (v4.2.0) for now until a proper solution is found using:您可以暂时安装以前的版本 (v4.2.0),直到使用以下方法找到合适的解决方案:

npm install react-icons@4.2.0 --save

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM