To fix Error: Failed to launch the browser process with Node Puppeteer, we call launch
with the browser path.
To fix this, we run
sudo apt-get install chromium-browser
to install the Chromium browser.
Then we write
const browser = await puppeteer.launch({
executablePath: "/usr/bin/chromium-browser",
});
to call launch
with an object with the executablePath
set to the Chromium browser path to start it.