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

'ThemeProvider' cannot be used as a JSX component.🐛[BUG] #98

Closed
distance321 opened this issue Aug 31, 2023 · 3 comments
Closed

'ThemeProvider' cannot be used as a JSX component.🐛[BUG] #98

distance321 opened this issue Aug 31, 2023 · 3 comments

Comments

@distance321
Copy link

distance321 commented Aug 31, 2023

🐛 bug 描述

组件库打包时会报错,'ThemeProvider' cannot be used as a JSX component.

📷 复现步骤

当package.json中的@typescript-eslint/eslint-plugin、@typescript-eslint/parser升到5以上时,组件库内使用ThemeProvider在打包时就会报错, 在4.x时没有这个问题。

💻 复现代码

image

© 版本信息

  • antd-style 版本: 3.4.4
  • 浏览器环境 chrome
  • 开发环境 mac OS

🚑 其他信息

image

@distance321 distance321 changed the title 🐛[BUG] 'ThemeProvider' cannot be used as a JSX component.🐛[BUG] Aug 31, 2023
@arvinxx
Copy link
Collaborator

arvinxx commented Aug 31, 2023

为啥关了

@distance321
Copy link
Author

发现并不是因为升级@typescript-eslint的问题 降版本后也不行

@distance321
Copy link
Author

升级这些依赖可以解决这个问题
"@types/react": "^18.0.10", "@types/react-dom": "^18.0.5",

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

2 participants