What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set executablePath in the options passed to puppeteer.launch(), and give it the absolute path to the browser executable that exists in the environment running Node.js. For example: await puppeteer.launch({ executablePath: '/usr/bin/google-chrome' }). This tells Puppeteer to use that browser instead of its bundled browser.

Set the path in puppeteer.launch()

The direct launch option is executablePath. Its value must identify the browser executable, not a directory containing it. Puppeteer documents the option as a path to use instead of the bundled browser in its LaunchOptions API.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    executablePath: '/absolute/path/to/chrome',
    headless: true,
  });

  try {
    const page = await browser.newPage();
    await page.goto('https://example.com');
    console.log(await page.title());
  } finally {
    await browser.close();
  }
})();

Replace /absolute/path/to/chrome with a real path for your operating system or runtime image. The Puppeteer configuration guide uses the equivalent form executablePath: '/path/to/Chrome'.

Choose between a path, a channel, and Puppeteer’s browser

Use executablePath when you manage the browser

Use an explicit absolute path if your application, container image, or CI worker installs Chrome or Chromium itself. The path is resolved in the filesystem where Node.js runs. A path on your development laptop does not help if that file is absent from the deployed container.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Puppeteer’s installation guide recommends an explicit executablePath when managing browsers yourself, or channel when the installed browser is in a standard location: Installation guide.

Use channel for a standard Chrome installation

If Chrome is installed in a standard location, you can ask Puppeteer to locate the channel rather than hard-coding a machine-specific path:

const browser = await puppeteer.launch({
  channel: 'chrome',
  headless: true,
});

The launch API documents both executablePath and channel. With puppeteer-core, one of these must be provided; see the launch API reference.

Use Puppeteer’s downloaded browser for its compatibility baseline

The puppeteer package can download Chrome for Testing and is designed around that browser as its compatibility baseline. Puppeteer does not guarantee that an arbitrary externally installed browser version will work the same way. If you do not have a reason to manage Chrome yourself, letting Puppeteer use its downloaded browser avoids maintaining an independent executable path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use an environment variable for environment-specific paths

A variable lets the same application code work across local development, CI, and container images without editing the source for each machine. Puppeteer’s documented configuration override is PUPPETEER_EXECUTABLE_PATH.

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
const puppeteer = require('puppeteer');

(async () => {
  const executablePath = process.env.PUPPETEER_EXECUTABLE_PATH;
  if (!executablePath) {
    throw new Error('Set PUPPETEER_EXECUTABLE_PATH to the browser executable');
  }

  const browser = await puppeteer.launch({
    executablePath,
    headless: true,
  });
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com');
  } finally {
    await browser.close();
  }
})();

Set the variable in the environment that starts the Node process, not only in an unrelated shell or build stage. For example, on Linux you might launch an application with PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium node app.js, provided that exact executable is installed in that runtime.

You can also put the persistent default in puppeteer.config.cjs:

/** @type {import('puppeteer').Configuration} */
module.exports = {
  executablePath: process.env.PUPPETEER_EXECUTABLE_PATH,
};

Puppeteer configuration files and their environment defaults do not affect puppeteer-core; the configuration guide says they are ignored for that package. Configure the launch call directly when using puppeteer-core.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common code variants

ES modules

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({
  executablePath: '/absolute/path/to/chrome',
});

try {
  const page = await browser.newPage();
  await page.goto('https://example.com');
} finally {
  await browser.close();
}

puppeteer-core

puppeteer-core does not download a browser, so tell it where the executable is or specify a channel:

import puppeteer from 'puppeteer-core';

const browser = await puppeteer.launch({
  executablePath: process.env.CHROME_BIN,
  headless: true,
});

For a standard Chrome location, a channel can be used instead:

import puppeteer from 'puppeteer-core';

const browser = await puppeteer.launch({
  channel: 'chrome',
  headless: true,
});

Do not leave both the path and channel unspecified with puppeteer-core; its launch API requires one of them.

Find the correct executable on your platform

There is no single path that works on every host. Install or identify the browser in the same runtime where Puppeteer will execute, then configure its actual path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Linux: Distribution packages and container images choose their own locations. Paths such as /usr/bin/google-chrome or /usr/bin/chromium-browser are examples, not guarantees. Check the target image rather than assuming a path from another Linux machine.
  • macOS: Point to the executable inside the Chrome application bundle, not simply to the .app directory. For example, the path should end at the browser binary within the bundle.
  • Windows: Use the full path ending in chrome.exe. In a JavaScript string, escape backslashes (for example, 'C:Program FilesGoogleChromeApplicationchrome.exe') or use String.raw to preserve them.

Check that the file exists and is executable by the Node process. In a container or CI job, perform that check inside the running image or worker, not just on the host that built it.

Configure Puppeteer in Docker or CI

Install the browser and its required system dependencies into the same image or worker that runs Puppeteer. Then provide the path that image actually contains, preferably through an environment variable. This makes the browser installation and the launch configuration travel together.

  1. Install the browser in the runtime image. Choose the package or base image appropriate to your environment; the path depends on that choice.
  2. Verify the executable in that image. Confirm the configured file exists and has execute permission where the application runs.
  3. Pass the path at runtime. Set PUPPETEER_EXECUTABLE_PATH for puppeteer, or pass the environment value directly to puppeteer-core as executablePath.
  4. Test the actual launch. Run a minimal script that launches, opens a page, and closes the browser in the same CI job or container configuration used by the application.

A laptop-only absolute path is not portable: it can point to a different location, or no file at all, in the deployment environment. For repeatable deployments, keep the browser installation, its system libraries, the Puppeteer version, and the configured executable path aligned.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Troubleshoot executablePath failures

Puppeteer says it cannot find Chrome or the executable

  • Print the configured value, including process.env.PUPPETEER_EXECUTABLE_PATH, immediately before launch.
  • Check that the value names a file rather than a parent directory or application bundle root.
  • Check that the file exists inside the running container or CI worker and is executable by the process user.
  • Remove a stale environment override if you want Puppeteer to use its downloaded compatible browser.

The official troubleshooting guide includes examples using external Chrome paths such as google-chrome-stable and PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser; use them as examples to verify, not universal locations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The managed browser was not downloaded

If you intend to use Puppeteer’s managed browser but installation scripts were blocked, run npx puppeteer browsers install after installing the package. Confirm the browser install completed in the environment where the application will launch it.

The external browser launches poorly or behaves differently

Compare the external browser’s version and launch behavior with the Chrome for Testing version supported by your Puppeteer release. Puppeteer treats its downloaded browser as the compatibility baseline, so an arbitrary browser build can introduce differences. If reproducibility matters more than using a system browser, remove the external override and use Puppeteer’s managed browser.

The app works locally but fails in CI

Usually the configured path belongs to the local machine rather than the CI worker. Log the resolved value in CI, inspect the worker’s filesystem, and install the browser and system dependencies in that job or image. Also check that the process user can execute the file.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, compatibility, and deployment trade-offs

Choosing an executable path is also choosing who manages browser versions. With Puppeteer’s downloaded browser, the package installation provides the browser version intended as the compatibility baseline. With an external path, your operating-system package, container image, or CI configuration controls installation and updates. That can fit a centrally managed environment, but it means your team must ensure the browser remains compatible with the Puppeteer release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Puppeteer’s current installation guide lists approximate browser download sizes of about 170 MB on macOS, 282 MB on Linux, and 280 MB on Windows. These are approximate download figures shown by the project, not a guarantee of installed disk use or runtime performance. Managing an external browser can avoid downloading Puppeteer’s browser during package installation, but it does not eliminate the need to package the executable and required system dependencies in the environment that runs the code.

The configuration reference labels its documentation version 25.12.0. Because Puppeteer APIs and browser packaging can change, check the documentation matching the version in your project’s lockfile when troubleshooting; the configuration reference is at Puppeteer configuration.

Or skip the browser setup

If the goal is to capture a webpage rather than manage a local Chrome installation, ScreenshotNeo provides a screenshot API and MCP server for developers. One GET request returns an image or PDF. Its capture process accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf.

For a WebP screenshot, use this cURL call, replacing the target URL as needed. See the ScreenshotNeo API documentation for request options:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

There is a free plan with 1,000 screenshots a month and no card required; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.

Frequently asked questions

Does executablePath have to be absolute?

Use an absolute path so the executable is unambiguous in the runtime environment. Confirm that exact path exists where Node.js launches the browser.

Can I use executablePath and channel together?

Choose the launch method that matches your setup: an explicit executable path for a managed/custom location, or a channel for a standard installation. The essential requirement for puppeteer-core is that at least one is provided.

Will PUPPETEER_EXECUTABLE_PATH configure puppeteer-core?

No. Puppeteer’s configuration file and environment defaults are ignored by puppeteer-core; pass the environment value into launch({ executablePath }) yourself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.