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

pnpm build 错误:TypeError: build is not a function #10640

Closed
xuguanqun opened this issue Mar 1, 2023 · 4 comments
Closed

pnpm build 错误:TypeError: build is not a function #10640

xuguanqun opened this issue Mar 1, 2023 · 4 comments

Comments

@xuguanqun
Copy link

node v14.8.0

�[1;36m[09:23:16] [User Command] + pnpm build
[09:23:16] 
[09:23:16] > compatible@1.0.0 build /root/workspace/aismile-compatible_zTYF
[09:23:16] > cross-env APP_ENV=build max build
[09:23:16] 
[09:23:19] info  - [你知道吗?] 如果你需要增加 Git 提交消息校验和自动代码格式化, max g precommit 就可以一键完成配置,详见 https://umijs.org/docs/guides/generator#precommit-配置生成器
[09:23:19] info  - Umi v4.0.51
[09:23:19] info  - Preparing...
[09:23:19] fatal - TypeError: build is not a function
[09:23:19]     at Hook.fn (/root/workspace/aismile-compatible_zTYF/node_modules/.pnpm/registry.npmmirror.com/@umijs/preset-umi@4.0.51/node_modules/@umijs/preset-umi/dist/features/prepare/prepare.js:54:33)
[09:23:19]     at async /root/workspace/aismile-compatible_zTYF/node_modules/.pnpm/registry.npmmirror.com/@umijs/core@4.0.51/node_modules/@umijs/core/dist/service/service.js:177:15
[09:23:19] fatal - A complete log of this run can be found in:
[09:23:19] fatal - /root/workspace/aismile-compatible_zTYF/node_modules/.cache/logger/umi.log
[09:23:19] fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues
[09:23:19]  ERROR  Command failed with exit code 1.
�[91m[09:23:19] [ERROR] BUILD ERROR
�[91m[09:23:19] [ERROR] 111791561
�[91m[09:23:19] [ERROR] 1
@fz6m
Copy link
Member

fz6m commented Mar 1, 2023

给最小复现看看

@Ruboyq
Copy link

Ruboyq commented Mar 3, 2023

给最小复现看看

我这也出这个错了 阿里云 云效流水线 node 14.8 就会报这个错
我指定node版本到14.17.3就好了

@fz6m
Copy link
Member

fz6m commented Mar 31, 2023

升级 node 18 和最新 umi 版本尝试下,如还有问题,再重新反馈吧。

@fz6m fz6m closed this as completed Mar 31, 2023
@Redxym
Copy link

Redxym commented Jul 17, 2023

确实,我node 14.6.0也会有这个错误,版本升级到评论里的node版本14.17.3就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants