Skip to content

(build error): (npx lerna run build --scope=aws-cdk-lib is failed with heap out of memory) #26415

@bun913

Description

@bun913

Describe the issue

First, I executed the following command, referring to the following page, to set up the environment:

npx lerna run build --scope=aws-cdk-lib

https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#building-aws-cdk-lib

However, I encountered the following error:

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

I resolved this issue by increasing the available memory space by executing the following command:

export NODE_OPTIONS="--max-old-space-size=8192"

After that, I ran the command again:

npx lerna run build --scope=aws-cdk-lib

Proposal

I understand that this error is not caused by this repository but rather by the user's environment.

However, I believe that if the build fails, it could hinder the intentions of future contributors.

Would it be possible to add the following statement to CONTRIBUTING.md?

"If you encounter FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory, please try running the command with increased memory by using export NODE_OPTIONS="--max-old-space-size=8192"."

I am also considering how far I should address this issue, so please let me know your opinion whether it is necessary or not if you think it is unnecessary.

Links

https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#building-aws-cdk-lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-appsyncRelated to AWS AppSyncdocumentationThis is a problem with documentation.effort/smallSmall work item – less than a day of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions