Skip to content
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

🐛[BUG] 是 icons 版本 没有 createFromIconfontCN 方法了? #7479

Closed
LengYXin opened this issue Aug 4, 2023 · 5 comments
Closed

Comments

@LengYXin
Copy link
Contributor

LengYXin commented Aug 4, 2023

🐛 bug 描述

错误信息 是 icons 版本 没有 createFromIconfontCN 方法了?

@le-dxp/platform: ../../node_modules/@ant-design/pro-layout/es/components/SiderMenu/BaseMenu.js:7:0
@le-dxp/platform: Module not found: Can't resolve '@ant-design/icons/lib/icons/createFromIconfontCN'
@le-dxp/platform: https://nextjs.org/docs/messages/module-not-found
@le-dxp/platform: Import trace for requested module:
@le-dxp/platform: ../../node_modules/@ant-design/pro-layout/es/components/TopNavHeader/index.js
@le-dxp/platform: ../../node_modules/@ant-design/pro-layout/es/index.js
@le-dxp/platform: ../../node_modules/@ant-design/pro-components/es/index.js
@le-dxp/platform: ../components/src/antd/progress/views/settings.tsx
@le-dxp/platform: ../components/src/antd/progress/index.tsx
@le-dxp/platform: ../components/src/antd/index.ts
@le-dxp/platform: ../components/src/index.ts

📷 复现步骤

lock 文件版本信息:

### ICONs
"@ant-design/icons@^5.0.0", "@ant-design/icons@^5.2.2", "@ant-design/icons@^5.x":
  version "5.2.4"
  resolved "https://registry.npmmirror.com/@ant-design/icons/-/icons-5.2.4.tgz#ffae1509e38d1a6518b67241ebf3274d625191d8"
  integrity sha512-WFPLMLiLaTcw7Vzwuglgm7aViI9DJ8SdrLt6r1rI1oxA1yjp02/ZRB4b+OFlFy2F91JMq3FnAQ9K6irq9QiSvw==
  dependencies:
    "@ant-design/colors" "^7.0.0"
    "@ant-design/icons-svg" "^4.3.0"
    "@babel/runtime" "^7.11.2"
    classnames "^2.2.6"
    lodash.camelcase "^4.3.0"
    rc-util "^5.31.1"

Pro

"@ant-design/[email protected]":
  version "2.6.10"
  resolved "https://registry.npmmirror.com/@ant-design/pro-components/-/pro-components-2.6.10.tgz#17601aa1e698f1f3ee41cc1b41c2496de9cc1501"
  integrity sha512-63R0/dGLolwXYFPONt5Rz2+aAe6JKt1XPDg9dWLW0RrqkGtRc57iP3/kK1epixqfHDkAgzBK7cXQQd2RR6QFlQ==
  dependencies:
    "@ant-design/pro-card" "2.5.9"
    "@ant-design/pro-descriptions" "2.4.10"
    "@ant-design/pro-field" "2.10.9"
    "@ant-design/pro-form" "2.17.1"
    "@ant-design/pro-layout" "7.16.6"
    "@ant-design/pro-list" "2.5.10"
    "@ant-design/pro-provider" "2.12.1"
    "@ant-design/pro-skeleton" "2.1.7"
    "@ant-design/pro-table" "3.10.4"
    "@ant-design/pro-utils" "2.12.8"
    "@babel/runtime" "^7.16.3"

Antd


antd@^5.x:
  version "5.8.1"
  resolved "https://registry.npmmirror.com/antd/-/antd-5.8.1.tgz#4d3ce5f985c447eeeca470315a6e3aa0f3de4c76"
  integrity sha512-6BEc6QDLzk01RrUjzIQ50oW2+mpscfBU1tusECi4OwEKgZmvmaW8ErvEDWtTHezIdr7dEMOEJlOZaOl8eXuaIw==
  dependencies:
    "@ant-design/colors" "^7.0.0"
    "@ant-design/cssinjs" "^1.16.0"
    "@ant-design/icons" "^5.2.2"
    ....

🏞 期望结果

💻 复现代码

© 版本信息

  • ProComponents 版本: [e.g. 2.6.10]
  • umi 版本
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

当前 Issue 未检测到标题,请规范填写,谢谢!

The title of the current issue is not detected, please fill in according to the specifications, thank you!

@github-actions github-actions bot closed this as completed Aug 4, 2023
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

当前 Issue 未检测到标题,请规范填写,谢谢!

The title of the current issue is not detected, please fill in according to the specifications, thank you!

@LengYXin LengYXin changed the title 🐛[BUG] 🐛[BUG] 是 icons 版本 没有 createFromIconfontCN 方法了? Aug 4, 2023
@wwz223
Copy link

wwz223 commented May 7, 2024

我这边也遇到了同样的问题,请问楼主解决了吗 @LengYXin

@1029800858
Copy link

1029800858 commented Jan 9, 2025

ant3升级至ant4。启动项目也遇到了。控制台提示
ERROR in ./node_modules/@ant-design/pro-layout/es/SiderMenu/BaseMenu.js Module not found: Error: Can't resolve '@ant-design/icons/es/icons/createFromIconfontCN' in 'F:\EvMars\node_modules\@ant-design\pro-layout\es\SiderMenu' @ ./node_modules/@ant-design/pro-layout/es/SiderMenu/BaseMenu.js 1:0-84 82:15-36 349:17-38 @ ./node_modules/@ant-design/pro-layout/es/TopNavHeader/index.js @ ./node_modules/@ant-design/pro-layout/es/index.js @ ./src/components/PageLoading/index.tsx @ ./src/.umi/core/routes.ts @ ./src/.umi/umi.ts @ multi ./src/.umi/umi.ts。看控制台报错源码路径好像跟你差不多,请问解决了吗。 @sorrycc

@1029800858
Copy link

我这边也遇到了同样的问题,请问楼主解决了吗 @LengYXin

请问你解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants