Node Spawn Bash Catch erros

const bashOut = spawn('bash', [script, param]);

  bashOut.on('error', (error) => {
    console.log('Bash error: ', error);
  });
Cheerful Corncrake