Open xlorne opened 6 days ago
在package.json 上锁定2.7.15可以解决问题
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/pro-components": "2.7.15",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"antd": "^5.20.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
"typescript": "^4.4.2",
"web-vitals": "^2.1.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Nextjs 14.2.10 + procomponents 2.7.15还会是报这个错误
在package.json 上锁定2.7.15可以解决问题
{ "name": "my-app", "version": "0.1.0", "private": true, "dependencies": { "@ant-design/pro-components": "2.7.15", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^13.0.0", "@testing-library/user-event": "^13.2.1", "@types/jest": "^27.0.1", "@types/node": "^16.7.13", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "antd": "^5.20.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-scripts": "5.0.1", "typescript": "^4.4.2", "web-vitals": "^2.1.0" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }
yes,2.7.15不存在这个问题。目前可以锁住这个版本
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
引入ProForm就出现错误
📷 复现步骤
运行起来就出现错误,yarn start
🏞 期望结果
正常展示 ProForm
💻 复现代码
my-app.tar.gz
© 版本信息
🚑 其他信息
这个项目是通过npx create-react-app my-app --template=typescript 创建的, 创建以后就添加了antd和@ant-design/pro-components 依赖,并没有做任何其他的操作。