Skip to content

Node sdout buffer size limits (stdout being truncated) #7

@yunusga

Description

@yunusga

Problem

If we have many templates, some times happens #3, !!! OUTPUT ERROR or Unexpected end of JSON input errors. This is child_process stdout being truncated.

Solution

If increase buffer size in lib/validator.js with option { maxBuffer: 1024 * 500 } all works.

// console.log(execPath.join(' '));
exec(execPath.join(' '), { maxBuffer: 1024 * 500 }, function (err, stdout, stderr) {
    let output = stdout;
    // ...

Proposal

Add option for setup maxBuffer if needed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions