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

Add max-buffer-size option for the parameter for pruning child process #614

Closed
wants to merge 1 commit into from
Closed

Add max-buffer-size option for the parameter for pruning child process #614

wants to merge 1 commit into from

Conversation

hrkt
Copy link
Contributor

@hrkt hrkt commented Mar 8, 2017

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

Hi.

I think it might be better if this command has "max-buffer-size" cli option (optional).

This patch enables users to avoid "stdout maxBuffer exceeded" error when
the size of pruning targets is larger than 200MB (default for child.exec).

In my case, the existence of many dependencies in package.json causes "stdout maxBuffer exceeded" without "--no-prune" option.

@malept
Copy link
Member

malept commented Mar 8, 2017

Thanks for the pull request. I'm worried that this is a pretty small edge case that will make using prune (and Electron Packager) more confusing.

Instead, could you try to install yarn and replace npm prune --production with yarn install --production in the code? I want to see if using an alternate package manager solves this problem for you.

@malept malept added the needs info Issue reporter needs to provide more information for maintainers to take action label Mar 8, 2017
@hrkt
Copy link
Contributor Author

hrkt commented Mar 8, 2017

Thank you for kind advice.

I tried editing common.js.

While
// child.exec('npm prune --production', {cwd: appPath}, cb)
fails in my case (app size > 400MB),
child.exec('yarn install --production', {cwd: appPath}, cb)
works like a charm.

@malept
Copy link
Member

malept commented Mar 8, 2017

I would rather have a pull request that implements #518 (and #515 - the spec for both is in #515 (comment)). Are you interested?

@malept malept closed this Mar 8, 2017
@hrkt
Copy link
Contributor Author

hrkt commented Mar 8, 2017

I read the #515, #518. The proposed idea of the packager option seems useful.

I'll try making new PR in this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Issue reporter needs to provide more information for maintainers to take action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants