-
Notifications
You must be signed in to change notification settings - Fork 585
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
使用pnpm下在依赖,编译报错 #598
Comments
我也遇到了同样的问题 "dependencies": { |
同 "@ant-design/icons": "^5.2.6", |
我把react版本降为18.1.0就可以使用,不知道是不是icon为兼容新版本react |
react版本: 18.2.21
antd版本: 5.8.4
antd-icon版本:5.2.6
使用import { AimOutlined } from '@ant-design/icons';
编译报错:
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Uncaught TypeError: Cannot read properties of null (reading 'useContext')
at Object.useContext (react.development.js:1616:1)
at AntdIcon.js:31:1
The text was updated successfully, but these errors were encountered: