-
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] next14 + ant design5.18.2 ,使用 官网登录表单案例报错: TypeError: Cannot read properties of undefined (reading 'Group') #8543
Comments
遇到了同样的问题,是什么原因呢 |
14.0.2 可以用,上去全都會錯 |
Here solution for actual 14 and 15 versions of Next.js ant latest antd + pro components, tested with 14.2.24 and 15.1.17 builds So, due to research: in some releases of Next.js versions some transpiles and optimizations for antd libs was removed (from defaults in Next sources) With that config you can build ant/pro-components with latest Next versions
Remember that some components like ProLayout and LoginForm do not work with ssr correctly, so use next/dynamic with ssr: false to import that components, otherwise build fails |
🐛 bug 描述
复制官网案例,啥也没改,运行报错:TypeError: Cannot read properties of undefined (reading 'Group')
📷 复现步骤
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/jsonwebtoken": "^9.0.6",
"@types/node": "^20.14.5",
"@types/react": "18.3.3",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"node-sass": "^9.0.0"
}
🏞 期望结果
描述你原本期望看到的结果
💻 复现代码
LoginForm 登录表单案例:
https://procomponents.ant.design/components/login-form
© 版本信息
🚑 其他信息
The text was updated successfully, but these errors were encountered: