Is there a way of handling the execa npm package callback. I have a Listr task that is supposed to start the project in background, however it freezes the console and the only way to unfreeze it is to Ctrl + Z. Are there any ways of running the script in background?
import execa from 'execa';
async function startProject() {
const result = execa('npm', ['start']);
if (!result) {
return Promise.reject(new Error('Failed to start the project automatically!'));
}
}
module.exports = startProject;