-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Attempted import error: 'ColorPicker' is not exported from 'antd' (imported as 'ColorPickerV5'). #8088
Comments
解决了嘛 |
降低版本即可,2.6.46就会报错 |
好的,谢谢。其实我想问的是官方有没有解决。现在问题还在,那就是官方也没解决。嗯,所以我在问啥?哈哈 |
"@ant-design/pro-components": "2.4.4",
"antd": "4.24.15", 现在使用 |
请问有谁解决了这个问题了吗 |
We ran into this today. After some digging here is what I found:
This could be part of the migration to drop support for Ant v4 as that increases the bundle size. See the discussion here: #8178 A contributor did call out that it would cause ant v4 to not work in the PR but it looks like the error can just be hidden in their webpack config. A possible(?) solution:
// package.json
"overrides": {
"@ant-design/pro-field": "2.14.2"
} Note however when I tested this locally, this does introduce the new design language from Antv5 and it would probably be best to start the migration from 4 -> 5. I did not test this override locally so cannot confirm it works |
As an addition when pro-field is not a direct dependency but used because pro-components is the dependency, then the resolutions field needs to be used in the package.json. "resolutions": {
"@ant-design/pro-field": "2.14.2"
} |
🐛 bug 描述
当@ant-design/pro-components版本大于^2.6.42的时候("例如2.6.44、2.6.46"),build会出现如下报错:
The text was updated successfully, but these errors were encountered: