alibaba / x-render

🚴‍♀️ 阿里 - 很易用的中后台「表单 / 表格 / 图表」解决方案
https://xrender.fun
6.91k stars 980 forks source link

2.0版本以上,vite build之后preview报错 #1044

Closed wangxinyu666666 closed 1 year ago

wangxinyu666666 commented 1 year ago

2.0.1版本,用vite build之后再preview会报错。1.14.13和1.14.14版本测试过了,没有问题。yarn add form-render时,自动安装1.14.14版本,不是最新版本,不几道为啥。

image

下面是报错的文件,红框是报错的地方

image image

下面是package.json { "name": "north-star-web", "private": true, "version": "0.0.0", "scripts": { "dev": "vite", "build": "tsc && vite build", "test": "vitest", "preview": "vite preview", "lint": "eslint --fix --ext .js,.jsx,.tsx,.ts .", "cypress:open": "cypress open", "cypress:run": "cypress run --browser chrome" }, "dependencies": { "@cubejs-client/core": "^0.30.46", "@cubejs-client/react": "^0.30.46", "@douyinfe/semi-ui": "^2.10.1", "@lexical/react": "^0.3.7", "@monaco-editor/react": "^4.4.6", "@ory/kratos-client": "0.7.0-alpha.1", "@reduxjs/toolkit": "^1.8.2", "@rjsf/core": "^4.2.0", "@tanstack/react-query": "4.13.5", "@types/antd": "^1.0.0", "@types/axios": "^0.14.0", "@types/echarts": "^4.9.15", "@types/jest": "^28.1.3", "@types/lodash": "^4.14.182", "@types/qs": "^6.9.7", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "@types/react-redux": "^7.1.24", "@types/react-syntax-highlighter": "^15.5.1", "@vitejs/plugin-react": "^1.3.0", "ahooks": "^3.7.1", "antd": "^4.24.6", "autoprefixer": "^10.4.7", "axios": "^0.27.2", "echarts": "^5.3.2", "echarts-for-react": "^3.0.2", "form-render": "2.0.1", "history": "^5.3.0", "husky": "^8.0.1", "less": "^4.1.3", "lexical": "^0.3.7", "lodash": "^4.17.21", "moment": "^2.29.3", "monaco-editor": "0.34.1", "postcss": "^8.4.14", "postcss-px-to-viewport": "^1.1.1", "postcss-px-to-viewport-8-plugin": "^1.1.3", "qs": "^6.11.0", "query-string": "^7.1.1", "react": "^18.0.0", "react-dom": "^18.0.0", "react-redux": "^8.0.2", "react-reflex": "^4.0.9", "react-rnd": "^10.4.1", "react-router-dom": "^6.8.1", "react-syntax-highlighter": "^15.5.0", "redux-thunk": "^2.4.1", "tailwindcss": "^3.0.24", "use-immer": "^0.7.0", "uuid": "^9.0.0" }, "devDependencies": { "@commitlint/cli": "^17.0.2", "@commitlint/config-conventional": "^17.0.2", "@nabla/vite-plugin-eslint": "^1.4.1", "@testing-library/cypress": "8.0.3", "@testing-library/dom": "8.19.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "14.4.3", "@types/css-mediaquery": "0.1.1", "@types/cypress": "^1.1.3", "@types/react": "18.0.25", "@types/react-dom": "18.0.8", "@types/react-router-dom": "5.3.3", "@types/testing-library__jest-dom": "5.14.5", "@typescript-eslint/eslint-plugin": "^5.28.0", "@typescript-eslint/parser": "^5.28.0", "@vitest/coverage-istanbul": "^0.25.2", "css-mediaquery": "0.1.2", "cypress": "^10.2.0", "eslint": "^7.32.0 || ^8.2.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^8.5.0", "eslint-config-react-app": "^7.0.1", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.25.3", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-testing-library": "^5.9.1", "jsdom": "^20.0.2", "msw": "^0.48.3", "prettier": "2.7.1", "typescript": "^4.6.3", "vite": "3.2.3", "vitest": "^0.24.5", "whatwg-fetch": "3.6.2" } }

lhbxs commented 1 year ago

这个看不出来是啥原因

lhbxs commented 1 year ago

yarn add ,是我修复1.x 问题的时候发布忘打tag所以默认装的是1.x

lhbxs commented 1 year ago

提供个测试仓库?