Skip to content

Increasing Memory Available to Spawned Instance of Nodeย #2820

Closed
@dfbaskin

Description

@dfbaskin

Does it make sense to provide some kind of mechanism to customize the options passed to the spawned Node instance (in react-scripts.js)? I'm trying to do something like this:

    const result = spawn.sync(
      'node',
      [
          '--max-old-space-size=8192',
          '--nouse-idle-notification',
          require.resolve('../scripts/' + script)
      ].concat(args),
      { stdio: 'inherit' }
    );

Hacking this file with the above changes makes my build work now without a memory error. But perhaps there is something more generic that could be implemented to give us the ability to pass options into the spawned instance of Node.

Related to #2555.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions