Categories
JavaScript Answers

How to fix Error: Failed to launch the browser process with Node Puppeteer?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.