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

[Bug] umi3升4之后,本地环境,页面刷新,偶尔报错;接入mako后,页面刷新不稳定,经常报错 #12824

Open
mingyigu opened this issue Dec 6, 2024 · 0 comments

Comments

@mingyigu
Copy link

mingyigu commented Dec 6, 2024

What happens?

umi3情况下,本地启动项目,浏览器访问没有问题,但最近升级到了umi4,发现本地环境,在浏览器刷新页面,偶尔会报错
image
将代码数量少的情况下,比较难复现,得刷新10几次页面会报一次,但代码多了之后,差不多刷新3次就会报错一次。

而我在此基础上开启mako: {}选项后,在本地环境,仅刷新页面,会非常频繁的报以下错误:
有时报这个
image
有时报这个
image

Mini Showcase Repository(REQUIRED)

Please provide a minimal reproduction then upload to your GitHub. 请提供 最小重现,并上传到你的 GitHub 仓库

How To Reproduce

运行项目后,访问本地环境,仅刷新浏览器页面即可复现

我的config.ts
image

Context

node: v20.17.0
pnpm: 9.9.0
这是我的一些依赖:
"dependencies": {
"@ant-design/pro-components": "^2.7.10",
"@loadable/component": "^5.14.1",
"@testing-library/jest-dom": "^5.11.4",
"@types/react-grid-layout": "^1.3.2",
"ahooks": "^3.7.7",
"ali-oss": "^6.13.2",
"antd": "4.24.5",
"axios": "^0.21.1",
"classnames": "^2.2.6",
"cross-env": "^7.0.3",
"dayjs": "^1.10.4",
"echarts-for-react": "^3.0.2",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"medium-zoom": "^1.0.6",
"mime": "^2.5.2",
"moment": "^2.29.4",
"node-sass": "9.0.0",
"pro-components": "link:@types/@ant-design/pro-components",
"qrcode.react": "^1.0.1",
"qs": "^6.9.6",
"quill-image-drop-and-paste": "^1.1.1",
"re-resizable": "^6.10.1",
"react": "17.x",
"react-dom": "17.x",
"react-grid-layout": "1.4.2",
"react-quill": "^1.3.5",
"react-resizable": "^3.0.5",
"react-router": "^6.5.0",
"react-router-dom": "^6.0.0",
"react-sortable-hoc": "^2.0.0",
"sass-loader": "^13.3.2",
"stylelint": "^13.12.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^21.0.0",
"stylelint-prettier": "^1.2.0",
"stylelint-scss": "^3.19.0",
"tiny-pinyin": "^1.3.2",
"typescript": "^4.8.3",
"@umijs/max": "^4.0.0",
"umi-request": "^1.3.5",
"video-react": "^0.14.1",
"xlsx": "^0.16.9"
},
"devDependencies": {
"@ant-design/icons": "^4.5.0",
"@types/ali-oss": "^6.0.7",
"@types/jest": "^26.0.15",
"@types/lodash-es": "^4.17.6",
"@types/node": "^12.0.0",
"@types/qs": "^6.9.5",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react-router-dom": "^5.1.7",
"@umijs/fabric": "^2.5.7",
"@umijs/plugin-sass": "^1.1.1",
"@umijs/test": "^3.4.8",
"antd-dayjs-webpack-plugin": "^1.0.6",
"babel-plugin-import": "^1.13.3",
"copy-to-clipboard": "^3.3.2",
"eslint": "^8",
"eslint-formatter-json-relative": "^0.1.0",
"husky": "^7.0.0",
"lint-staged": "^12.3.5",
"path-to-regexp": "^6.2.0",
"prettier": "2.6.2",
"simple-progress-webpack-plugin": "^1.1.2"
},

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

1 participant