Freddy Bonda
Freddy Bonda

Reputation: 1259

node-cmd increase maxBuffer size

I am using a node package that allows me to get control of the cmd: https://www.npmjs.com/package/node-cmd

My problem is that I am running into a stdout maxBuffer exceeded error. I have found a question that answers this problem: Stdout buffer issue using node child_process

My problem is, how do I apply this answer to the node-cmd package's cmd.run or cmd.get calls?

Example of a call that is giving the error: (ng build runs a BIG Angular command)

cmd.get('ng build', (err, data, stderr) => {
    ...
});

I am not sure where to insert something like {maxBuffer: 1024 * 500}

Upvotes: 0

Views: 1186

Answers (1)

Tsvetan Ganev
Tsvetan Ganev

Reputation: 8836

You can run the ng build command with the --progress flat set to false in order to avoid displaying so much output to the console.

ng build --progress false

Upvotes: 1

Related Questions