umijs / umi

A framework in react community ✨
https://umijs.org
MIT License
15.3k stars 2.65k forks source link

因为有next项目,所以之前升级了node版本,Node.js v20.11.1,umi版本3.5.36 启动访问项目 会报错AssertionError [ERR_ASSERTION]: chunk of umi not found.[Bug] say something #12240

Closed LBJDJW closed 5 months ago

LBJDJW commented 5 months ago

因为有next项目,所以之前升级了node版本,Node.js v20.11.1,umi版本3.5.36 启动访问项目 会报错AssertionError [ERR_ASSERTION]: chunk of umi not found.[Bug] say something

{ "name": "analysis", "version": "1.2.0", "private": true, "description": "一站式业务支撑平台", "scripts": { "analyze": "cross-env ANALYZE=1 umi build", "build": "umi build && node shell.js", "dev": "npm run start:dev", "format-imports": "cross-env import-sort --write '/*.{js,jsx,ts,tsx}'", "lint": "umi g tmp && npm run lint:js && npm run lint:style && npm run lint:prettier", "lint:prettier": "prettier --check \"*/\" --end-of-line auto", "lint-staged": "lint-staged", "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ", "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style", "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", "lint:style": "stylelint --fix \"src//*.less\" --syntax less", "prettier": "prettier --write '/*.{js,jsx,tsx,ts,less,md,json}'", "start": "cross-env UMI_UI=none umi dev", "start:no-mock": "cross-env MOCK=none umi dev", "start:no-ui": "cross-env UMI_UI=none umi dev", "tsc": "tsc", "ui": "umi ui" }, "lint-staged": { "*/.less": "stylelint --syntax less", "/*.{js,jsx,ts,tsx}": "npm run lint-staged:js", "/.{js,jsx,tsx,ts,less,md,json}": [ "prettier --write" ], ".ts?(x)": [ "prettier --parser=typescript --write" ] }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 10" ], "dependencies": { "@ant-design/icons": "^4.0.2", "@ant-design/pro-layout": "^6.2.2", "@ant-design/pro-table": "^2.4.1", "@antv/g2plot": "^1.0.2", "@babel/helper-compilation-targets": "^7.9.6", "@babel/plugin-syntax-numeric-separator": "^7.8.3", "@dnd-kit/core": "^6.0.8", "@dnd-kit/sortable": "^7.0.2", "@upsetjs/react": "^1.9.1", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-react": "^1.0.6", "@yaireo/tagify": "^4.17.4", "antd": "4.15.6", "array-move": "^4.0.0", "axios": "^0.19.2", "babel-eslint": "^10.1.0", "classnames": "^2.2.6", "copy-to-clipboard": "^3.3.3", "d3": "^5.16.0", "d3-3d": "^0.1.2", "dva": "^2.6.0-beta.20", "echarts": "^5.0.0", "echarts-gl": "^2.0.8", "html2canvas": "1.0.0-rc.4", "jspdf": "^2.5.1", "jspdf-html2canvas": "^1.4.9", "lodash": "^4.17.15", "lodash-decorators": "^6.0.0", "lodash.debounce": "^4.0.8", "lodash.isequal": "^4.5.0", "matrix-eig": "^1.0.0", "moment": "^2.29.1", "numeral": "^2.0.6", "omit.js": "^1.0.2", "path-to-regexp": "^6.1.0", "prop-types": "^15.5.10", "qs": "^6.9.1", "react": "^16.13.0", "react-color": "^2.18.0", "react-dom": "^16.13.0", "react-helmet": "^5.2.1", "react-highlight-words": "^0.17.0", "react-infinite-scroller": "^1.2.4", "react-mathjax": "^1.0.1", "react-router": "^4.3.1", "react-show-more-text": "^1.4.6", "react-sortable": "^2.0.0", "react-sortable-hoc": "^2.0.0", "react-window": "^1.8.5", "redux": "^4.0.5", "svg-file-downloader": "^0.0.2", "svg2pdf.js": "^2.2.0", "umi": "^2.13.3", "umi-plugin-react": "^1.15.2", "use-merge-value": "^1.0.1", "venn.js": "^0.2.20", "wink-statistics": "^2.1.1" }, "devDependencies": { "@ant-design/pro-cli": "^1.0.19", "@types/classnames": "^2.2.9", "@types/express": "^4.17.2", "@types/history": "^4.7.5", "@types/jest": "^25.1.3", "@types/lodash": "^4.14.149", "@types/lodash.debounce": "^4.0.6", "@types/lodash.isequal": "^4.5.5", "@types/qs": "^6.9.1", "@types/react": "^16.9.23", "@types/react-dom": "^16.9.5", "@types/react-helmet": "^5.0.15", "@types/react-router": "^5.1.4", "@umijs/fabric": "^2.0.7", "chalk": "^3.0.0", "check-prettier": "^1.0.3", "cross-env": "^7.0.0", "cross-port-killer": "^1.2.1", "eslint": "^6.8.0", "eslint-config-airbnb": "^18.2.0", "eslint-plugin-react": "^7.20.6", "express": "^4.17.1", "husky": "^4.2.3", "import-sort-cli": "^6.0.0", "import-sort-parser-babylon": "^6.0.0", "import-sort-parser-typescript": "^6.0.0", "import-sort-style-module": "^6.0.0", "jsdom-global": "^3.0.2", "lint-staged": "^10.0.8", "mockjs": "^1.1.0", "node-fetch": "^2.6.0", "prettier": "^1.18.2", "stylelint": "^14.6.1", "stylelint-config-css-modules": "^4.1.0", "stylelint-config-prettier": "^9.0.3", "stylelint-config-standard": "^25.0.0", "stylelint-declaration-block-no-ignored-properties": "^2.5.0", "stylelint-no-unsupported-browser-features": "^5.0.3", "typescript": "^4.2.4", "umi-plugin-antd-icon-config": "^1.0.3", "umi-plugin-antd-theme": "^1.0.15", "umi-types": "^0.5.12" }, "engines": { "node": ">=10.0.0" }, "checkFiles": [ "src//.js", "src//.ts", "src//*.less", "config//.js", "scripts//*.js" ] }

yarn start之后没有报错,当我浏览器访问链接 终端直接报错 信息为 node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^

AssertionError [ERR_ASSERTION]: chunk of umi not found. at D:\project\sangon-web\node_modules@umijs\preset-built-in\lib\plugins\commands\htmlUtils.js:104:27 at Array.forEach () at chunksToFiles (D:\project\sangon-web\node_modules@umijs\preset-built-in\lib\plugins\commands\htmlUtils.js:93:14) at D:\project\sangon-web\node_modules@umijs\preset-built-in\lib\plugins\commands\htmlUtils.js:189:32 at Generator.next () at asyncGeneratorStep (D:\project\sangon-web\node_modules@umijs\preset-built-in\lib\plugins\commands\htmlUtils.js:62:103) at _next (D:\project\sangon-web\node_modules@umijs\preset-built-in\lib\plugins\commands\htmlUtils.js:64:194) at processTicksAndRejections (node:internal/process/task_queues:95:5) { generatedMessage: false, code: 'ERR_ASSERTION', actual: undefined, expected: true, operator: '==' }

Node.js v20.11.1 Done in 88.66s.

我设置了 $env:NODE_OPTIONS = "--openssl-legacy-provider" 也没用

github-actions[bot] commented 5 months ago

由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。