Exec node - Spawn Mode

#1

Hi all

I built a simple tool to flash and test some piece of hardware. I have a button that to flash that exectutes a exec node with the "make flash" command. This exec node is in spawn mode and I write to a text box and everything goes smoothly since I see the output I would normally see on the terminal.
I have another button to start unit tests by means of an exec node in spawn mode that runs the command "npm test". In this case the output doesn't go to the text box as it happens with the "make flash".

I suppose it has something to do with child processes. but when I do it in the terminal I see the output without a problem.

Any ideas on how to solve this?

Thank you,
Pedro

#2

First put a debug node on outputs 1 and 2 and see if anything appears. If not then what happens if you run your command in the terminal using
npm test > outfile.txt
That will send stdout to the file so you should see nothing in the terminal. If the output still appears on the terminal then the result is not going to stdout.