ScreenshotNeo

BlogHow-to

How to Find the Browser Executable Path in Puppeteer

Print Puppeteer’s default browser path, launch a custom Chrome binary, and fix missing executable errors across local and deployed environments.

By the ScreenshotNeo team4 October 20267 min read

To print the browser executable path Puppeteer computes for its configured browser, call puppeteer.executablePath(). To launch a different installed browser, pass its absolute path as executablePath to launch(). The file must exist and be executable in the same environment where Node.js runs.

import puppeteer from 'puppeteer';

console.log(puppeteer.executablePath());

const browser = await puppeteer.launch();
try {
  console.log(await browser.version());
} finally {
  await browser.close();
}

See the Puppeteer executablePath API and launch options. For browser setup, cache configuration, and deployment details, consult the configuration guide and troubleshooting guide.

1. Print and verify Puppeteer’s computed path

Run the path check from the project and runtime that encounter the problem. This reports Puppeteer’s computed default for its configured browser; it does not prove that the binary exists in another container, server, or developer’s machine.

import fs from 'node:fs';
import puppeteer from 'puppeteer';

const executablePath = puppeteer.executablePath();
console.log({ executablePath, exists: fs.existsSync(executablePath) });

If you use CommonJS, the equivalent is:

const fs = require('node:fs');
const puppeteer = require('puppeteer');

const executablePath = puppeteer.executablePath();
console.log({ executablePath, exists: fs.existsSync(executablePath) });

The path is resolved from Puppeteer’s browser and cache configuration. Puppeteer documents ~/.cache/puppeteer as the default browser cache and PUPPETEER_CACHE_DIR as an override. Starting with Puppeteer v19.0.0, downloaded browsers are stored in that cache by default. See the configuration guide for the settings that affect installation and browser lookup.

2. Launch a system-installed browser by path

When you need a browser installed separately from Puppeteer’s managed download, supply its absolute executable path. The browser option can identify the browser type. Replace the example path with a real path for your operating system and runtime.

import puppeteer from 'puppeteer';

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

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

executablePath must point to the browser executable, not its containing directory, a shortcut, or a path that exists only on your workstation. Puppeteer says compatibility is only guaranteed with its bundled browser; validate a custom browser against your Puppeteer version and the features your code uses.

3. Choose between a managed browser, system Chrome, and puppeteer-core

Setup How to get the path What to account for
puppeteer with its managed browser puppeteer.executablePath() Usually the least surprising setup: Puppeteer is designed to work with its downloaded browser. Ensure installation and the browser cache are present in the runtime.
Custom or system-installed browser Find the installed binary for that environment, then pass it as executablePath. You control the browser version and installation. Puppeteer does not guarantee arbitrary browser versions will work.
puppeteer-core Provide executablePath or a browser channel. puppeteer-core does not provide the normal browser download and configuration defaults of the full package. Make browser provisioning part of your setup.

For example, with puppeteer-core and an explicit executable:

import puppeteer from 'puppeteer-core';

const browser = await puppeteer.launch({
  executablePath: '/absolute/path/to/chrome',
});
try {
  console.log(await browser.version());
} finally {
  await browser.close();
}

For a channel-based launch, provide a channel supported by your installed browser setup instead of a path. The launch options document the available settings. If you manage browser installations programmatically, the @puppeteer/browsers API documents computeExecutablePath for managed cache binaries and computeSystemExecutablePath for system Chrome lookup. A system lookup can fail when no browser is installed in a known location.

4. Find the path in the environment that actually launches Chrome

  1. Run puppeteer.executablePath() inside the failing application, container, or deployment runtime.
  2. Check that exact path exists there and that the process has permission to execute it.
  3. Confirm the browser download was not skipped. If installation used skipDownload or PUPPETEER_SKIP_DOWNLOAD, provide a system browser or enable the required download.
  4. Check whether the install and runtime stages share the browser cache. If they do not, configure PUPPETEER_CACHE_DIR for a location available to the runtime and ensure the browser is installed there.
  5. On Linux, check for missing shared libraries as well as the executable itself. Puppeteer’s troubleshooting guide suggests using ldd on the Chrome binary to inspect dynamic dependencies.

A path from macOS or Windows will not automatically resolve inside Linux, and a path from a build stage may not survive into a separate runtime image. Install or copy the browser into the environment that launches it, and verify its dependencies and permissions there. Puppeteer’s troubleshooting guide includes deployment guidance for cloud environments.

5. Troubleshoot missing-path and launch errors

Symptom Likely cause Fix
Could not find Chrome or no executable at the computed path The browser was not downloaded, the cache differs from the one used at install time, or the runtime cannot see the build-time cache. Print puppeteer.executablePath() in the failing runtime. Install the expected browser there or set a shared PUPPETEER_CACHE_DIR and install into it.
spawn ... ENOENT The configured path is wrong or the executable is absent in that environment. Check the full path, filename, container image, and whether the file exists at runtime. Pass the executable itself as executablePath.
Permission denied The process cannot execute the browser file or access its parent directories. Correct file and directory permissions for the runtime user, then verify that user can execute the binary.
Browser binary exists but exits immediately or reports missing libraries Required operating-system libraries are unavailable, or the browser is incompatible with the environment. Use ldd /path/to/chrome on Linux to inspect dynamic dependencies, install the required distribution-specific dependencies, and validate the browser version.
Works locally but fails after deployment The local path or cache was not provisioned in the hosted runtime, or the runtime user and permissions differ. Install the browser as part of deployment, configure the cache path consistently, and run the path and permission checks in the deployed environment.
Launch fails and someone suggests --no-sandbox This is an environment sandbox configuration issue, not an executable path issue. Do not treat disabling the sandbox as a path fix. Follow Puppeteer’s sandbox guidance and configure the environment appropriately; its troubleshooting guide strongly discourages running without a sandbox.

6. Performance, reliability, and cost considerations

Path lookup is a configuration check; the main operational concern is making browser installation repeatable. Pin a compatible Puppeteer and browser setup for your application, ensure deployment installs or preserves the same browser cache, and verify the executable in the final runtime image. A system browser can simplify shared installation management, but it makes you responsible for version compatibility and updates. Puppeteer’s bundled browser is its documented compatibility baseline.

For CI and containers, avoid relying on a developer-specific home directory or an ephemeral install cache. Choose a cache location available to the process, provision it in the environment that runs the job, and include OS dependencies. The dossier documents no benchmark or fixed cost for resolving this path; compute and hosting costs depend on your deployment and workload.

7. Or skip the browser setup

If your goal is simply to capture a website, ScreenshotNeo is a website screenshot API and MCP server: one GET request returns a PNG, JPEG, WebP, or PDF, so you do not need to locate and provision a browser executable for the capture.

See the ScreenshotNeo API documentation. This runnable cURL example saves a WebP screenshot:

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://stripe.com \
  -o shot.webp

Python:

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer())));

Cookie and consent banners are accepted and removed before capture, along with 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 cost nothing, and response headers report the page verdict and billing status. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Create a free ScreenshotNeo account for 1,000 screenshots a month with no card.

8. FAQ

Does puppeteer.executablePath() launch the browser?

No. It returns the computed path. Call puppeteer.launch() to launch a browser.

Can I use a Chrome path from my laptop in a container?

Only if that same path names an installed, executable browser inside the container. Host paths are not automatically available in containers.

Is puppeteer.executablePath() available with puppeteer-core?

The simple default workflow described here is for puppeteer. With puppeteer-core, supply an executablePath or browser channel when launching.

What is the safest default browser choice?

Use the browser bundled for your Puppeteer installation unless you have a reason to manage a custom browser. Custom binaries should be checked against your Puppeteer version and runtime.