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

在mac上,项目正常运行,整个项目拷贝到window电脑,运行就报错:@ant-design/icons/lib/dist 找不到 #26371

Closed
1 task
z-lionel opened this issue Aug 24, 2020 · 7 comments

Comments

@z-lionel
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

umijs/umi#5015

Steps to reproduce

如题

What is expected?

正常运行

What is actually happening?

This dependency was not found:

  • @ant-design/icons/lib/dist in ./node_modules/antd/es/icon/index.js

To install it, you can run: npm install --save @ant-design/icons/lib/dist

Environment Info
antd undefined
React "react": "^16.8.6",
System window
Browser chrome
@afc163
Copy link
Member

afc163 commented Aug 24, 2020

整个项目拷贝到window电脑

不要这么操作,建议 clone 并重新安装 node_modules。

@afc163 afc163 closed this as completed Aug 24, 2020
@afc163 afc163 added the Usage label Aug 24, 2020
@ant-design-bot
Copy link
Contributor

Hello @z-lionel, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please don't ask usage questions here. You can try to ask questions on Stack Overflow or Segment Fault, then apply tag antd and react to your question.

你好 @z-lionel,Ant Design Issue 板块是用于 bug 反馈与需求讨论的地方。请勿询问如何使用的问题,你可以试着在 Stack Overflow 或者 Segment Fault 中提问(记得添加 antdreact 标签哦~)。

@z-lionel
Copy link
Author

整个项目拷贝到window电脑

不要这么操作,建议 clone 并重新安装 node_modules。

我重新删除了node_modules了,在重新yarn了,依然报错。
版本如下:
"@ant-design/icons": "^4.2.2",
"antd": "^3.26.18",

在 antd/es/icon/index.js 文件里面引用的 ant-design/icons/lib/dist 没有这个文件夹,
请问这个是版本的问题吗?

@afc163
Copy link
Member

afc163 commented Aug 24, 2020

@ant-design/icons 应该和 antd 4 一起使用,请不要混用。

@z-lionel
Copy link
Author

@ant-design/icons 应该和 antd 4 一起使用,请不要混用。
现在不是我想混用,而是我用的"antd": "^3.26.18"这个版本的时候,就会报这个错

@wukong615
Copy link

我也遇到了这个问题:@ant-design/icons/lib/dist 找不到。
使用的antd版本 3.20.0。出现这个问题的原因是:
在解决 3.x 版本全量引入@ant-design/icons图标文件时 resolve 路径中加入了 /dist,去掉 /dist 后可以正常启动

@yoyo837
Copy link
Contributor

yoyo837 commented Apr 7, 2021

3.x 自带 @ant-design/icons 2.x

4.x 需要自行安装 @ant-design/icons 4.x

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

5 participants