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

[vite] Internal server error: [vite] Named export 'UserOutlined' not found. The requested module '@ant-design/icons' is a CommonJS module, which may not support all module.exports as named exports. #652

Closed
Liian123 opened this issue Jul 19, 2024 · 1 comment · Fixed by #653

Comments

@Liian123
Copy link

当我在vite 5.1.0 和remix2 中使用时,导入图标组件会报错,以下是报错信息;当使用"@ant-design/icons": "5.1.4" 版本则没问题。

[vite] Named export 'UserOutlined' not found. The requested module '@ant-design/icons' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@ant-design/icons';
const {UserOutlined} = pkg;

项目地址 https://github.com/Liian123/my-remix-app

急急急

@afc163
Copy link
Member

afc163 commented Jul 21, 2024

Fixed in @ant-design/[email protected]: #653

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

Successfully merging a pull request may close this issue.

2 participants