Skip to content
Advertisement

Weird output “<Buffer" in child_process.spawn

Trying to write a script to dump my MongoDB to afterwards restore it in a Test database again.

JavaScript

Weirdly the script does what it is supposed to (I can find the output BSON under the specified location), but the output is cryptic:

JavaScript

Advertisement

Answer

That output is just encoded text.

Try this to see the real output:

JavaScript

Note that this output is coming from stderr, not stdout

The stuff that you posted translates as:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement