Ezviz-OpenBiz / EZUIKit-JavaScript-npm

轻应用npm版本,降低接入难度,适配自定义UI,适配主流框架
234 stars 82 forks source link

react 打包后 黑屏 #178

Open yun6472 opened 6 months ago

yun6472 commented 6 months ago

pcLive 模式下面 在本地运行正常 打包之后页面报错 react 版本是 18.2.0 ezuikit-js 版本是 8.0.2 Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'mousedown') at Object.add (index-73c1db3f.js:13807:44368)

Uncaught TypeError: Cannot read properties of undefined (reading 'JS_Resize') at index-73c1db3f.js:12626:5630

freeshineit commented 6 months ago

是CRA 创建的项目构建的吗 还是vite , 能提供一下package.json 吗

yun6472 commented 6 months ago

是CRA 创建的项目构建的吗 还是vite , 能提供一下package.json 吗

"dependencies": { "@ant-design/icons": "^5.2.6", "@gitee/icons-react": "^0.1.49", "@react-pdf-viewer/core": "^3.12.0", "@tiptap/core": "^2.1.12", "@tiptap/pm": "^2.1.12", "@types/js-cookie": "^3.0.3", "@types/node": "^20.8.9", "@types/react-beautiful-dnd": "^13.1.4", "@types/three": "^0.155.1", "antd": "^5.8.0", "axios": "^1.4.0", "braft-editor": "^2.3.9", "braft-extensions": "^0.1.1", "echarts": "^5.4.3", "echarts-for-react": "^3.0.2", "ezuikit-js": "7.6.8", "jotai": "^2.3.1", "js-cookie": "^3.0.5", "lowlight": "^3.1.0", "moment": "^2.29.4", "react": "^18.2.0", "react-beautiful-dnd": "^13.1.1", "react-dom": "^18.2.0", "react-draggable": "^4.4.5", "react-file-viewer": "^1.2.1", "react-router-dom": "^6.15.0", "react-virtualized": "^9.22.5", "sass": "^1.65.1", "swiper": "^11.0.5", "three": "^0.162.0", "tslib": "^2.6.2" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@types/react-virtualized": "^9.21.29", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "@vitejs/plugin-react": "^4.0.3", "eslint": "^8.45.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "typescript": "^5.0.2", "vite": "^4.4.5" }

freeshineit commented 6 months ago

是CRA 创建的项目构建的吗 还是vite , 能提供一下package.json 吗

"dependencies": { "@ant-design/icons": "^5.2.6", "@gitee/icons-react": "^0.1.49", "@react-pdf-viewer/core": "^3.12.0", "@tiptap/core": "^2.1.12", "@tiptap/pm": "^2.1.12", "@types/js-cookie": "^3.0.3", "@types/node": "^20.8.9", "@types/react-beautiful-dnd": "^13.1.4", "@types/three": "^0.155.1", "antd": "^5.8.0", "axios": "^1.4.0", "braft-editor": "^2.3.9", "braft-extensions": "^0.1.1", "echarts": "^5.4.3", "echarts-for-react": "^3.0.2", "ezuikit-js": "7.6.8", "jotai": "^2.3.1", "js-cookie": "^3.0.5", "lowlight": "^3.1.0", "moment": "^2.29.4", "react": "^18.2.0", "react-beautiful-dnd": "^13.1.1", "react-dom": "^18.2.0", "react-draggable": "^4.4.5", "react-file-viewer": "^1.2.1", "react-router-dom": "^6.15.0", "react-virtualized": "^9.22.5", "sass": "^1.65.1", "swiper": "^11.0.5", "three": "^0.162.0", "tslib": "^2.6.2" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@types/react-virtualized": "^9.21.29", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "@vitejs/plugin-react": "^4.0.3", "eslint": "^8.45.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "typescript": "^5.0.2", "vite": "^4.4.5" }

您提供的依赖 我试了没有复现你说的问题。 我的配置和版本: node: 18.14.2 ezuikit-js: 8.0.2 / 7.6.8 (这两个版本都试了)

能提供一下浏览器控制台的日志吗 , 可以发送到 open-team@ezvizlife.com (不要发在github 上)