October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk8 min

How to Configure Puppeteer for Browser Automation

A practical Puppeteer setup guide for Node.js: browser downloads, project configuration, launch options, locators, deployment requirements, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a new Node.js automation project, install puppeteer and let it download its compatible Chrome for Testing browser. Put shared download and cache defaults in a Puppeteer configuration file, then set per-run behavior—such as headless mode and viewport—in launch(). Choose puppeteer-core instead when your application supplies or remotely manages the browser.

The guidance below reflects Puppeteer documentation version 25.12.0 where identified, checked in 2026. Puppeteer changes over time; verify the live official documentation and platform requirements before deploying.

As an Amazon Associate I earn from qualifying purchases.

Choose the Puppeteer package and browser ownership

Package or setup Use it when Browser behavior
puppeteer You want the simplest new local project setup. Installation downloads a compatible Chrome for Testing build and, starting with Puppeteer v21.6.0, a chrome-headless-shell binary. Its browser cache defaults to $HOME/.cache/puppeteer starting with v19.0.0. Puppeteer guarantees compatibility with its bundled browser, not arbitrary browser versions. Installation guide
puppeteer-core Your application manages a local browser, or connects to a remote browser. It does not download Chrome. Provide executablePath for a managed local browser, or configure the connection for your remote-browser setup. Puppeteer configuration files and environment variables are ignored by puppeteer-core. Installation guide

If Chrome is installed in a standard location, the channel launch option can select it. For either a custom executable or channel, use a browser version compatible with your Puppeteer version; only the bundled browser is guaranteed to work.

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

Install Puppeteer and its browser

Use a current Node.js release that meets the version-specific requirements: the Puppeteer 25.12.0 requirements page lists Node 22.12 or newer. If you use TypeScript, that page lists TypeScript 5.0.1 or newer, and recommends targeting ES2022 or later when type-checking node_modules. Check the live requirements for your operating system and architecture before setup. System requirements

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
  1. Install Puppeteer in your project: npm i puppeteer. The guide also documents Yarn, pnpm, and Bun. Installation guide

  2. Allow the package’s install script to run. Puppeteer uses it to download the browser. Some package managers or project policies block install scripts; if yours does, run npx puppeteer browsers install after package installation or explicitly allow Puppeteer’s install script in your package-manager configuration.

  3. For a project that supplies its own browser instead, install puppeteer-core and arrange for a compatible browser to be available. Do not expect that package to download Chrome.

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

The installation guide’s approximate download-size planning figures, as surfaced for version 25.12.0 and accessed in 2026, are about 170 MB for macOS, 282 MB for Linux, and 280 MB for Windows. Actual downloads can vary; allow for the browser files in build time, network use, and cache storage.

Set project defaults in a configuration file

Use configuration for persistent project-wide settings, such as the browser download cache location or download behavior. Puppeteer recognizes files including .puppeteerrc.js, .puppeteerrc.json, and puppeteer.config.js, as well as a Puppeteer entry in package.json. See the configuration guide for the supported settings and file format.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Configuration and runtime launch options have different jobs. Configuration covers defaults such as browser download settings, cache directory, executable path, logging, skipped downloads, and temporary directory; launch() controls a particular browser run. Applicable environment variables override configuration values. Proxy settings such as HTTPS_PROXY are environment-only. If you change browser download settings, rerun npx puppeteer browsers install so the browser installation reflects them.

Launch a browser and automate a page

This runnable ES module example uses the downloaded browser, opens a page, navigates, sets a viewport, reads the title, and closes the browser even if an operation fails:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.setViewport({ width: 1080, height: 800 });
  console.log(await page.title());
} finally {
  await browser.close();
}

Run it in a project configured to use ES modules, for example with "type": "module" in package.json, or adapt the import to the module system your project uses. The try/finally cleanup is a practical safeguard: an exception during navigation or page work should not leave the browser process running.

The basic flow is launch, create a page, navigate, optionally set its viewport, interact with the page, collect the result, then close the browser. Puppeteer’s getting-started guide covers this sequence.

Choose headless mode deliberately

Setting What it does Good fit
headless: true Runs modern headless Chrome; this is the documented launch default. Most automation jobs that do not need a visible window.
headless: 'shell' Runs the separate old-headless chrome-headless-shell binary. Automation that does not need the full Chrome feature set and where its performance characteristics suit the job. Shell does not completely match regular Chrome.
headless: false Opens a visible browser window. Local debugging when you need to observe what Chrome is doing.

The distinction between modern headless Chrome and the separate shell binary is version-sensitive; consult the headless modes guide. Avoid routinely replacing Puppeteer’s default arguments: its API documentation says to use ignoreDefaultArgs with care. Launch options

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Use locators for interactions and waits

Puppeteer’s Page interactions guide recommends locators for selecting elements and interacting with them. A locator click waits for the element to enter the viewport, become visible and enabled, and remain stable across two animation frames. Locators can also fill common input and select fields and wait for visibility or a function-based condition. Page interactions guide

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.
await page.locator('button[type="submit"]').click();
await page.locator('input[name="email"]').fill('[email protected]');

Use a locator’s timeout or a condition-based wait when a page takes time to reach the expected state. If the element or a required precondition does not appear before the timeout, Puppeteer raises TimeoutError. Prefer these waits to fixed sleeps for ordinary interactions: a fixed delay can waste time when the page is ready early and still be too short when it is slow.

waitForSelector() is a lower-level alternative, but it does not automatically retry a later action. It returns an element handle; dispose of the handle when finished with it.

Configure a managed or remote browser

Supply a local executable path

With puppeteer-core, point Puppeteer at the browser executable your application manages:

import puppeteer from 'puppeteer-core';

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 the example path with the actual executable path for the host. Alternatively, use channel when selecting a Chrome installation in a standard location. Neither option makes an arbitrary browser version compatible by default; the bundled-browser guarantee does not extend to it. Launch options

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Connect to a remote browser

Use puppeteer-core when the browser is operated separately from the Node.js process. The remote service must provide the connection details and protocol endpoint required for its browser; those details are specific to that service, so do not substitute a local executablePath for a remote connection. Refer to Puppeteer’s browser management guide and the remote provider’s instructions.

Deploy on supported systems and containers

The Puppeteer 25.12.0 system-requirements page lists Chrome for Testing support for Windows x64, macOS x64 and arm64, Debian/Ubuntu Linux x64 and arm64, and openSUSE/Fedora Linux x64 and arm64, subject to required Linux system packages. Verify the live list for your precise distribution and architecture rather than assuming that any Linux image will work. System requirements

  • Install shared libraries. A missing browser dependency or unsupported distribution can prevent Chrome from starting; install the system packages required by the browser and use a supported platform.

  • Check writable startup locations. Chrome writes profile, configuration, and cache data at startup. Ensure the process user can write to these locations and its user-data directory. In containers, writable /tmp paths may be appropriate where the official troubleshooting guidance calls for them.

    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.
  • Keep the sandbox usable. Chrome’s sandbox protects the host from untrusted web content. Configure a usable sandbox for the host; do not treat --no-sandbox as a routine launch fix.

    Best Value
    Sale
    Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
    • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
    • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
    • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
  • Account for Alpine’s limitation. Puppeteer’s troubleshooting guide warns that Chrome does not support Alpine out of the box. A successful install of the Node package alone does not establish that its browser can run on that image.

These platform, sandbox, and container details are covered in Puppeteer’s troubleshooting guide.

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

Troubleshoot common setup and launch failures

Symptom Likely cause What to check or change
Could not find Chrome (ver. ...) The install script was blocked, so the browser download did not run. Run npx puppeteer browsers install after installing the package, or allow Puppeteer’s install script in package-manager settings. If you changed download configuration, run the browser install command again. Installation guide
A custom executablePath will not launch The path may be wrong, or the browser version may not work with the installed Puppeteer version. Confirm the executable exists at that path and check the chosen browser and its compatibility. The bundled browser is the only one Puppeteer guarantees. Launch options
Chrome reports a sandbox error on Linux The host does not provide a usable sandbox setup. Configure the host’s sandbox correctly. Avoid disabling it as a default workaround because the sandbox protects the host against untrusted page content. Troubleshooting
Container exits or crashes before Puppeteer connects The browser cannot write profile, configuration, or cache data as the process user. Check permissions for the user-data directory and startup paths; use writable temporary paths where appropriate. Troubleshooting
Browser reports missing libraries or fails on a Linux image Required system dependencies are absent, or the distribution is unsupported for Chrome. Install the required packages and compare the OS and architecture with Puppeteer’s current system requirements. Chrome does not support Alpine out of the box. System requirements · Troubleshooting
Windows launch conflicts with enforced Chrome extension policies Organization policy can conflict with Puppeteer’s default disabling of extensions. Only for this specific policy conflict, consult the documented enableExtensions workaround; it is not a general fix for unrelated launch failures. Troubleshooting
A locator interaction times out The element or one of the conditions required for interaction did not become true in time. Check that the selector matches the intended element, that the page reached the expected state, and whether the locator’s timeout or condition needs adjustment. Page interactions guide

Or skip the browser setup

If your task is simply to obtain a website screenshot rather than automate an interactive browser workflow, ScreenshotNeo is a website screenshot API and MCP server. A single request can return a screenshot or PDF without installing and maintaining Puppeteer in your application.

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

See the ScreenshotNeo API documentation for parameters and response details. Cookie and consent banners are accepted like a visitor and removed along with 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. 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.

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Further reading

UI Testing with Puppeteer: Implement end-to-end testing and browser automation using JavaScript and Node.js by Dario Kondratiuk is a Packt paperback published in 2021. It covers setup, selectors, browser automation, and end-to-end testing. Because it predates the current Puppeteer documentation, check live docs for version-sensitive settings. Packt book page

Frequently Asked Questions

Does Puppeteer work with TypeScript?

Yes. The Puppeteer 25.12.0 system requirements list TypeScript 5.0.1 or newer; check the current requirements if using a different release.

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

Can I use a system-installed Chrome instead of the downloaded browser?

Yes. Supply its executable path or select a standard installation with the `channel` option, while accounting for the fact that only Puppeteer’s bundled browser is guaranteed compatible.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.