Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumNodeJSchild_process spawningSingle-choice MCQ

When spawn() is given a command that does not exist on PATH (with shell:false), how is the failure surfaced?

const child = spawn('no-such-binary'); child.on('error', (e) => console.log(e.code));