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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

If Playwright reports that Chromium is missing on Vercel, the usual cause is that the browser binary Playwright expects was not installed for the deployed build or was not included in the function bundle. Installing the Playwright package alone does not guarantee that Chromium is present in production. Either install and bundle the browser revision that matches your Playwright version, or use playwright-core with a compatible serverless Chromium package and its executable path.

This guide covers both approaches, Vercel deployment checks, and the common failure modes. If you only need screenshots returned by an API rather than a browser running inside your function, there is also a managed alternative below.

Why Playwright cannot find Chromium on Vercel

Playwright and its browser binaries are separate deployment concerns. A Node.js package can be present in your project while the browser executable it needs is absent from the deployed function. Playwright normally stores browser binaries in an operating-system cache, and a local development cache is not proof that Vercel included those files in the production artifact.

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

There is also a version dependency: Playwright expects specific browser revisions. The Playwright documentation states that each Playwright version needs specific versions of browser binaries to operate. Installing a different Chrome or Chromium build, or upgrading Playwright without reinstalling its browser, can leave the executable missing or incompatible.

A distinct error occurs when using playwright-core. It does not select and install a browser for you; your launch configuration must supply a compatible executablePath or channel. Playwright warns that using a custom executable is not guaranteed to work with other versions. For a serverless deployment, use a browser package intended for that runtime instead of guessing at a system Chrome path.

Choose a deployment approach

Approach What you install Best fit Main trade-off
Bundle Playwright’s Chromium Playwright plus the matching Chromium revision installed during the build The browser fits in the function artifact and the build reliably includes it Browser files increase the bundle, and build and runtime versions must stay aligned
Use serverless Chromium with Playwright Core playwright-core and @sparticuz/chromium You want a Chromium executable and launch arguments supplied for serverless use The package extracts Chromium at runtime; startup, memory, and compatibility still matter
Host a separate Chromium pack playwright-core and @sparticuz/chromium-min, plus a separately hosted pack You can host the browser pack and make it reachable from the function The function depends on retrieving that external pack

Start with one of the first two paths; do not combine browser installations casually. For either path, deploy to the Node.js runtime. Browser automation needs Node.js APIs and cannot run in an Edge function.

Path A: install and bundle Playwright’s matching Chromium

1. Pin the Playwright dependency

Use a lockfile and a pinned project dependency so the build and runtime resolve the same Playwright version. For example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm install --save-exact playwright

If Playwright is already a dependency, check the version recorded in your lockfile and make sure the deployed build uses that lockfile. Avoid relying on a globally installed package or a browser cache left over from local development.

2. Install the browser during the build

Run Playwright’s browser installation command for Chromium as part of the build process:

npx playwright install chromium

The command must run in the environment used to produce the deployment, after the project’s dependencies are installed. When upgrading Playwright, run the install step again so the browser revision matches the new version.

3. Verify the browser reaches the function

Do not assume that installing Chromium on the build machine automatically places it in the Vercel function output. Inspect the generated deployment artifact or function output tracing to confirm the browser directory is included and readable at runtime. If the browser is present in the build cache but omitted from the function bundle, production will still report a missing executable.

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

Check the path Playwright resolves in a controlled diagnostic route, and compare it with the files actually packaged. Do not hard-code a path copied from your laptop: cache paths vary by operating system and environment.

4. Launch and close the browser safely

With the full Playwright package, a basic Node.js route can use Playwright’s managed browser path rather than supplying a custom executable:

import { chromium } from 'playwright';

export const runtime = 'nodejs';

export async function GET() {
  let browser;
  try {
    browser = await chromium.launch({ headless: true });
    const page = await browser.newPage();
    await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
    return Response.json({ title: await page.title() });
  } catch (error) {
    console.error('Chromium launch or page load failed:', error);
    return Response.json({ error: 'Browser request failed' }, { status: 500 });
  } finally {
    if (browser) await browser.close();
  }
}

This example is for a Node.js server route in a framework that supports the Web Response API. Adapt the handler signature to your framework if needed. The important deployment properties are the Node.js runtime, the build-installed matching browser, and cleanup in finally.

Path B: use @sparticuz/chromium with Playwright Core

This route uses a serverless Chromium package that provides launch arguments and resolves its executable path. Install both packages as production dependencies, not only as development dependencies:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm install playwright-core @sparticuz/chromium

The package README’s Playwright pattern passes chromium.args and awaits chromium.executablePath(). Use both rather than hard-coding a guessed executable path:

import { chromium as playwright } from 'playwright-core';
import chromium from '@sparticuz/chromium';

export const runtime = 'nodejs';

export async function GET() {
  let browser;
  try {
    browser = await playwright.launch({
      args: chromium.args,
      executablePath: await chromium.executablePath(),
      headless: true,
    });

    const page = await browser.newPage();
    await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
    return Response.json({ title: await page.title() });
  } catch (error) {
    console.error('Chromium launch or page load failed:', error);
    return Response.json({ error: 'Browser request failed' }, { status: 500 });
  } finally {
    if (browser) await browser.close();
  }
}

On first use, @sparticuz/chromium extracts its compressed browser binary to /tmp/chromium; a warm function instance may reuse that extracted file. That makes cold-start extraction part of the runtime behavior: test a cold invocation as well as a warm one, and allow sufficient function time and memory for launch and page work.

When to use chromium-min

@sparticuz/chromium-min is for the remote-pack model, not a drop-in fix without additional setup. Its documentation describes hosting the Chromium pack separately and making that pack reachable from the function. Choose it only if you can provide and maintain that reachable pack; otherwise use the package that supplies the serverless executable locally.

Check Vercel’s runtime and function limits

  • Runtime: Set the route to Node.js, not Edge. A browser process depends on Node.js APIs.
  • Function size: Vercel documents a standard maximum compressed Node.js function bundle size of 250 MB. The limit is on the compressed function bundle, so inspect the deployed artifact rather than estimating from the source tree.
  • Large-function beta: On June 29, 2026, Vercel announced a 5 GB package-size beta for eligible Fluid Compute projects. This is not the standard limit: it requires eligibility and the appropriate project configuration. Do not plan around it unless your project qualifies and the setting is available to it.
  • Memory and duration: Vercel’s memory and duration limits depend on plan. Set realistic values for browser startup, page loading, and any work after navigation; a correct executable can still fail if the function runs out of memory or reaches its duration limit.
  • Artifact tracing: Check the generated function output for the selected browser package and its required files. A successful local launch does not establish that Vercel deployed them.

Keep Playwright and Chromium compatible

Treat the Playwright package, playwright-core where used, and the Chromium package as a compatibility set. Pin versions in the lockfile, update related packages together, and redeploy after a browser or package upgrade. Playwright’s BrowserType API cautions that a custom executable may not work with an arbitrary browser version, which is why matching package guidance is safer than pointing to an unrelated system installation.

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

Before directing normal traffic to a deployment after an upgrade, run a smoke request that actually launches Chromium and loads a simple page. Record the Playwright and Chromium package versions and the resolved executable path in a safe diagnostic log. Do not log secrets, cookies, authorization headers, or sensitive page content.

Troubleshoot by the exact failure

“Executable doesn’t exist” or a missing-path error

Likely cause: Chromium was not installed for the deployed build, or its directory was left out of the function artifact.

Fix: Run npx playwright install chromium during the deployment build for Path A, or confirm the serverless package is included for Path B. Inspect the traced function files and log the resolved path in a controlled diagnostic route. A path that exists locally is not enough.

playwright-core requires an executable path or channel

Likely cause: Core was installed without a browser selection. Unlike the full Playwright package with its installed browser, playwright-core does not choose an executable automatically.

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.

Fix: Supply executablePath: await chromium.executablePath() and args: chromium.args from @sparticuz/chromium, or switch to the full Playwright package and install its matching Chromium revision.

The deployment exceeds the function size limit

Likely cause: The browser and dependencies push the compressed function bundle over the applicable limit.

Fix: Include Chromium only rather than installing unused browser engines; check that duplicate or unused browser files are not bundled. If your architecture supports hosting a separate pack, consider @sparticuz/chromium-min. Evaluate Vercel’s eligible large-function configuration only if the project meets its requirements; the beta does not change the standard limit for every deployment.

Launch reports missing shared libraries

Likely cause: The Chromium build is not compatible with the deployed runtime environment, even if the executable file exists.

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

Fix: Confirm the serverless Chromium package and Node.js runtime are a supported pairing, then update the related packages together and redeploy. Do not assume a binary that launches on a local machine is portable to Vercel.

It works locally but fails on Vercel

Likely cause: The local operating system, cache, package versions, environment variables, or included files differ from the deployment.

Fix: Compare the runtime OS and package versions, inspect the deployed files, confirm required configuration is present, and verify the executable path in the function. Run a production-like smoke test rather than using local success as the deployment check.

The browser launches but the request times out or dies

Likely cause: Browser startup and page work exceed the function’s time or memory allocation, or the browser process is not closed on an error path.

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

Fix: Set a suitable function duration and memory allocation for the actual page workload. Keep browser closure in a finally block and test both cold and warm starts. If the workload cannot fit the available function limits, move the browser workload to an environment designed to run it rather than repeatedly tuning an incompatible function.

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 to get a website screenshot rather than run custom Playwright interactions inside your Vercel function, ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. A single GET request returns an image or PDF, so your function does not need to package and launch Chromium. See the ScreenshotNeo API documentation for request options.

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

ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. This is an alternative for screenshot capture, not a replacement if your application needs arbitrary browser automation or page interactions beyond the service’s supported options.

Sign up for ScreenshotNeo and start with 1,000 free screenshots a month, no card required.

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

When self-hosted Playwright is the right choice

Keep Playwright on Vercel when the function needs browser actions that an image API cannot perform, such as application-specific interaction or custom automation that must run in your own code. Make the choice against concrete constraints: whether the browser fits in the function bundle, whether builds reproducibly include it, cold-start extraction time, runtime memory, and whether the request fits Vercel’s duration limits. If those constraints do not fit, a managed screenshot endpoint or a separate browser runtime may be simpler than forcing a full browser into a function.

Frequently Asked Questions

Does installing the Playwright npm package install Chromium in the Vercel deployment?

Not necessarily. The browser binary must also be installed and included in the deployed function; verify the generated artifact.

Can I use a locally installed Chrome by setting executablePath?

You can provide a custom executable path, but Playwright warns that compatibility with another browser version is not guaranteed. Prefer a matching Playwright browser or a serverless Chromium package.

Can I run this browser code in a Vercel Edge Function?

No. Use the Node.js runtime for browser automation because it requires Node.js APIs.

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.

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.