0

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}

catcat
  • 131
  • 5
Freddy Bonda
  • 1,189
  • 6
  • 15
  • 33
  • 2
    This has nothing to do with CMD. – catcat Jan 21 '19 at 06:19
  • why do you say that? I am running a command `ng build` in the cmd. It is through a 3rd party thing, but the cmd is still part of the pipeline, and therefore part of the problem. – Freddy Bonda Jan 21 '19 at 08:24
  • Show your CMD batch file or command. There is not one in your question. – catcat Jan 21 '19 at 08:47
  • `ng build` is my command. `ng build` is what I would type into cmd – Freddy Bonda Jan 21 '19 at 08:59
  • This has nothing to do with CMD. `ng` is a program like `CMD`, it runs itself. And you aren't using full paths, acting like you are typing in `CMD` **BUT** you are not using `CMD` and nor are you typing. I am tired of python and node people tagging their questions CMD. CMD is a Windows tag and neither python or Node are part of Windows. – catcat Jan 21 '19 at 22:55

1 Answers1

1

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

Tsvetan Ganev
  • 8,246
  • 4
  • 26
  • 43