出现这个报错的原因是因为使用了antd最新版本V5,试着把antd最新版本先卸载,然后再把版本降低到V4.1.3,最终成功。 执行步骤: 第一步:yarn remove antd 第二步:yarn add antd@4.1.3