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

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

Closed
LBJDJW opened this issue Mar 27, 2024 · 4 comments

Comments

@LBJDJW
Copy link

LBJDJW commented Mar 27, 2024

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.

Copy link

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
@xiaohuoni
Copy link
Member

群里看到类似的,加一个环境变量试试 NODE_OPTIONS=--openssl-legacy-provider

@LBJDJW
Copy link
Author

LBJDJW commented Mar 27, 2024

群里看到类似的,加一个环境变量试试 NODE_OPTIONS=--openssl-legacy-provider

我试过了 这次不行 我现在降node版本了

@fz6m
Copy link
Member

fz6m commented Mar 29, 2024

有很多项目他们要求的 node 版本号不同是很正常的,因为新旧不同,不可能都能用最新的 node 跑起来,不然 node 还发大版本干啥,必然可能有 breaking change 。

所以最好得在项目里加入 nvm 的配置,让 nvm 自动去切换 node 版本,如果 nvm 觉得太重影响终端启动时间,就用 fnm 手动去修改 node 版本再启动项目即可,你可以设定一些 alias 来加快切换 node 版本的过程。

或者你可以尝试 node v18 能不能用,能用的话就没必要 v20 。

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

3 participants