element-plus: [Build] # buildError - generateTypesDefinitions

Bug Type: Build

Environment

  • Vue Version: 3.2.27
  • Element Plus Version: 2.3.0
  • Browser / OS: macOS 13.0
  • Build Tool: Other

Reproduction

Related Component

  • N/A

Reproduction Link

Steps to reproduce

just start task : pnpm run build.

What is Expected?

成功构建 Successfully built

What is actually happening?

build error when run Task generateTypesDefinitions error message: <— JS stacktrace —>

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Additional comments

image image

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

@morningClock I try your way.Oh!.it works.Thank you!

I’m having the same issue. I successfully completed the build by executing the debug information of the script and adjusting the memory limit of the execution build task ‘generateTypesDefinitions’, and the following is my workaround.

image

image

Maybe you can try to add parameters to allocate memory, such as pnpm build --max-old-space-size=4096. I tried it on my machine and it works fine.

ok! I build successfully when i use machine with 16GB. I will try your advice tomorrow and reply you.