How to use child-process-promise

var promise = require(‘child-process-promise’).spawn; promise(‘some_command_producing_output’) .then(function (result) { … }) .catch(function (err) { … }); What I …

Node child_process await result

I have a async function which makes a face_detection command line call. It’s working fine otherwise, but I can’t make it to wait for the response. Here is my function: async uploadedFile(@UploadedFile(…

Node.js child process exec returning : Error: kill EPERM STDERR STDOUT_SIZE

I am exposing and API dedicated to printing logs from a Linux System D service. Here is a sample of the code: If the date in “completeCmd” is close enough (ex: last 10 days), everything works… if the date is too far back (ex: 3 months ago), the process fails in a weird way: The response is returned in about 187 ms, so it is not a timeout… Theories: Could it be a limitation in the possible size of stdout ? Could it be linked to the fact that my command use sudo ? Thanks ! Answer Reading the error

Weird output “

Trying to write a script to dump my MongoDB to afterwards restore it in a Test database again. const {spawn} = require(‘child_process’); const backupDB = spawn(‘C:\_Apps\mongo\bin\mongodump.exe’…