You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Vite集成Elastic UI时动态导入EuiIcon图标失败求助

EuiIcon组件无法渲染shard/bullseye图标,动态导入模块失败

仓库信息

  • 仓库地址:https://github.com/rorymcd98/spot-the-image-gen

安装与运行步骤

  • 安装依赖:yarn install
  • 启动开发服务器:yarn dev

问题详情

在./src/components/Counters.tsx中使用Elastic UI的EuiIcon组件时遇到异常:尝试导入shard和bullseye类型的图标,图标无法正常渲染,同时开发控制台抛出以下错误:

caught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:5174/node_modules/.vite/deps/assets/bullseye?import

我已尝试将对应图标文件放置在public/assets/{name}.svg路径下,但问题仍未解决,希望有人能查看仓库代码定位问题,谢谢!

内容的提问来源于stack exchange,提问作者Rory McDonald

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.22 08:54:56