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

Set Puppeteer’s executablePath launch option to the absolute path of the browser executable available in the same runtime as your Node.js process. For example:

const puppeteer = require('puppeteer');

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

This path replaces Puppeteer’s downloaded browser for that launch. It must point to an executable file inside the current laptop, container, or CI worker—not a path that exists only on your development machine.

What executablePath does

executablePath is a Puppeteer launch option containing the filesystem path to the browser binary. When supplied, Puppeteer starts that browser instead of its bundled Chrome for Testing build. The path is resolved by the operating system where Node.js runs.

Puppeteer’s managed Chrome for Testing is the project’s compatibility baseline. An arbitrary system Chrome or Chromium version may work, but Puppeteer does not guarantee compatibility with every external version. If you do not need a system-installed browser, allowing Puppeteer to manage its own browser is usually the least portable setup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Set the path in CommonJS

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    executablePath: process.env.PUPPETEER_EXECUTABLE_PATH || '/usr/bin/google-chrome',
    headless: true,
  });

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

The environment variable is useful because the same source can run on different operating systems or images. The fallback should be a real path for the machine on which the script executes.

Set the path in ESM

import puppeteer from 'puppeteer';

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

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

Use puppeteer-core

puppeteer-core does not download a browser. Its launch call must provide either executablePath or channel.

import puppeteer from 'puppeteer-core';

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

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

If CHROME_BIN is unset, the value is undefined and launch will fail. Validate it before starting the browser in production.

Use a browser channel instead of a hard-coded path

When Chrome is installed in a standard location, a channel can be more portable than embedding an operating-system-specific path:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const browser = await puppeteer.launch({
  channel: 'chrome',
  headless: true,
});

The launch API supports both channel and executablePath. With puppeteer-core, provide one of them. A channel asks Puppeteer to locate the named standard installation; an explicit path is better when your image has a non-standard location or several browser binaries.

Configure a persistent default

Puppeteer’s configuration interface exposes executablePath, and the documented environment override is PUPPETEER_EXECUTABLE_PATH. A puppeteer.config.cjs file can keep the setting out of individual scripts:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
/** @type {import('puppeteer').Configuration} */
module.exports = {
  executablePath: process.env.PUPPETEER_EXECUTABLE_PATH,
};

This configuration applies to the puppeteer package. Configuration files and environment defaults are ignored by puppeteer-core; pass the launch option directly when using that package.

Find the correct executable on each platform

Linux

Distribution packages and container images choose their own locations. Common values include paths such as /usr/bin/google-chrome, /usr/bin/google-chrome-stable, or /usr/bin/chromium-browser, but do not assume a path from another image. Inspect the target runtime and ensure the file has execute permission. The binary, shared libraries, fonts, and sandbox requirements all need to be present in the same image.

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

macOS

Point to the executable inside the application bundle, not merely to the .app directory. A typical Chrome bundle path is:

/Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Spaces are ordinary characters in a JavaScript string. If the application is installed for one user or in a custom location, use that actual bundle path.

Windows

Use the complete path to chrome.exe. In a normal JavaScript string, escape backslashes:

const executablePath = 'C:\Program Files\Google\Chrome\Application\chrome.exe';

Alternatively, use a raw string literal:

const executablePath = String.raw`C:Program FilesGoogleChromeApplicationchrome.exe`;

Environment variables avoid committing a developer-specific user profile path to source control.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Docker and CI: the path belongs to the runtime image

A path on your laptop has no meaning inside a container or remote CI worker. Install the browser and required system dependencies in the same image or worker that runs Node.js, then expose the resulting path through an environment variable.

ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable

In a CI job, set the equivalent variable in the job configuration and log the resolved value. If the image uses Chromium rather than Google Chrome, use the binary name actually installed there. Also confirm that the user running the job can execute it and that your container’s sandbox policy is compatible with the browser. Avoid adding launch flags merely by habit; add only the flags required by the image and its security model.

For reproducibility, pin the container image and browser package together. Updating a system browser independently of the Puppeteer release can introduce protocol or launch differences. Puppeteer’s downloaded Chrome for Testing is generally easier to keep aligned with the package version.

Validate the value before launch

Fail early with a readable error instead of waiting for Puppeteer’s generic launch message:

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.
import fs from 'node:fs';
import puppeteer from 'puppeteer-core';

const executablePath = process.env.CHROME_BIN;
if (!executablePath) {
  throw new Error('CHROME_BIN is not set');
}
if (!fs.existsSync(executablePath)) {
  throw new Error(`Browser executable does not exist: ${executablePath}`);
}

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

Checking existence catches a missing mount, typo, or wrong operating-system path. It does not prove that the file is executable or that all shared libraries are installed, so a real launch test is still required.

Choosing between managed Chrome, a path, and a channel

Approach Who manages the browser Portability Best fit
Default Puppeteer browser Puppeteer installation Highest alignment with the package Local development and controlled deployments that allow the download
executablePath Your OS image or host Depends on an identical path and installed dependencies Docker, CI, managed hosts, or preinstalled enterprise browsers
channel Your standard browser installation More portable than a literal path when installation conventions are stable Standard Chrome installations on developer machines or workers
puppeteer-core plus path/channel Your application and image Explicit and minimal, but no automatic download Libraries and services that package browsers separately

Use an absolute path when you control the image and know its location. Use a channel when the browser is installed conventionally. Use Puppeteer’s managed browser when compatibility and setup simplicity matter more than reusing a system installation.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Troubleshooting executable-path errors

“Could not find Chrome” or the executable is missing

  • Print process.env.PUPPETEER_EXECUTABLE_PATH and the final launch value.
  • Run an existence check inside the container or CI worker, not on your laptop.
  • Confirm that the value names the binary file, not a directory or macOS application bundle root.
  • Install the browser in the same image or worker where Node.js runs.

The path exists but launch still fails

  • Check execute permission and the libraries required by the distribution package.
  • Verify that the runtime user can access the file and its parent directories.
  • Compare the external browser version and launch behavior with the Chrome for Testing version supported by your Puppeteer release.
  • Inspect the complete browser stderr output; a missing shared library or sandbox restriction is different from a bad path.

Puppeteer unexpectedly uses the downloaded browser

Remove stale assumptions and inspect the effective configuration. Ensure the environment variable is set before Node starts and that your script is passing the intended option. Conversely, if you want the managed browser, remove an old PUPPETEER_EXECUTABLE_PATH override. If dependency-install scripts were blocked, install the managed browser explicitly with:

npx puppeteer browsers install

The browser works locally but not in CI

CI often has a different filesystem, user, architecture, and dependency set. Print the path, browser version, current user, and working directory in the job log. Rebuild the image with the browser included, rather than copying a host path into a container. Keep the Puppeteer package and browser version changes coordinated.

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

Performance, reliability, and cost considerations

Launching a browser is usually more expensive than opening a normal HTTP connection, so reuse one browser process for multiple pages when your workload allows it. Close pages and the browser in a finally block, and set timeouts appropriate to your site. A persistent, pinned image avoids repeated browser downloads and reduces “works on my machine” differences, while Puppeteer’s managed browser reduces compatibility drift.

The approximate download sizes listed in Puppeteer’s installation guide are about 170 MB on macOS, 282 MB on Linux, and 280 MB on Windows. These are download figures, not memory or execution guarantees, and can affect CI cache size and build time. External browsers shift that storage responsibility to your image or host.

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

Or skip the browser setup

If your goal is a reliable website screenshot rather than browser automation, ScreenshotNeo returns a PNG, JPEG, WebP, or PDF from one request. It accepts cookie and consent banners like a visitor, then removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.

Use the API documentation at https://screenshotneo.com/docs/ for the full option set.

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
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also provides an MCP server for Claude, Cursor, and other MCP clients, with take_screenshot, get_page_info, and capture_pdf tools. Features include full-page lazy-image loading, CSS-selector element capture, device presets, retina scale, PDF controls, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Create a free ScreenshotNeo account to get started.

Practical decision checklist

  • Need Puppeteer automation and a reproducible browser? Use the managed Chrome for Testing browser unless your deployment requires a system binary.
  • Have a pinned Docker or CI image? Set an absolute executablePath through PUPPETEER_EXECUTABLE_PATH and validate it inside that image.
  • Have a conventional Chrome installation? Try channel: 'chrome' instead of hard-coding a path.
  • Using puppeteer-core? Supply executablePath or channel explicitly; its configuration files do not provide a browser.
  • Only need clean screenshots or PDFs? Use the ScreenshotNeo request rather than maintaining browser binaries and cleanup code.

Frequently Asked Questions

Can I pass a relative path to executablePath?

Use an absolute path. It remains unambiguous when the working directory changes between local runs, containers, and CI jobs.

Does setting executablePath install Chrome?

No. It only tells Puppeteer which already-installed executable to start. Installation, permissions, and system dependencies remain your responsibility.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Why does puppeteer-core require executablePath or channel?

puppeteer-core does not download or select a browser automatically, so launch must identify one with an explicit path or a standard installation channel.

Should I use Chrome or Chromium?

Use the executable actually installed in your target runtime and keep its version aligned with the Puppeteer release you support.

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.