Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Best way to set --max-old-space-size when running npm? #12238

@codeimpossible

Description

@codeimpossible

We have some pretty large builds at Hudl, and we've been seeing npm install fail with ECONNRESET errors. We spent a lot of time debugging the issue and are fairly confident the failures were due to npm hitting the upper limit of memory within node and being terminated prematurely.

We changed our npm.cmd file to set --max-old-space-size to 4gb when starting npm, and this fixed our issue, but we're wondering if there is a better way to set this parameter when running npm?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions