🤖 Persist the Playwright executable between Netlify builds

Overview

🤖 Netlify Plugin Playwright Cache

npm version PRs Welcome

Persist the Playwright executables between Netlify builds.

Why netlify-plugin-playwright-cache

When you install playwright-chromium, it downloads Chromium executables to a cache folder (not node_modules). Netlify does not cache this folder between builds, but caches node_modules. This leads to unsuccessful builds with the following error like this:

11:33:48 PM: [: Executable doesn't exist at /opt/buildhome/.cache/ms-playwright/chromium-1019/chrome-linux/chrome
╔═════════════════════════════════════════════════════════════════════════╗
11:33:48 PM: ║ Looks like Playwright Test or Playwright was just installed or updated. ║
11:33:48 PM: ║ Please run the following command to download new browsers:              ║
11:33:48 PM: ║                                                                         ║
11:33:48 PM: ║     npx playwright install                                              ║
11:33:48 PM: ║                                                                         ║
11:33:48 PM: ║ <3 Playwright Team                                                      ║
11:33:48 PM: ╚═════════════════════════════════════════════════════════════════════════╝

This plugins fixes the above issue by caching the Playwright executables (Chromium, ffmpeg...) between builds.

Installation

You can install netlify-plugin-playwright-cache by one of the following ways:

  1. Install directly from Netlify Dashboard:

  1. Install as a dependency of your project:
npm install --save-dev netlify-plugin-playwright-cache
# Or
yarn add -D netlify-plugin-playwright-cache
# Or
pnpm add -D netlify-plugin-playwright-cache

Then update netlify.toml to include the plugin:

[[plugins]]
  package = "netlify-plugin-playwright-cache"

Usage

Remember to Clear cache and retry deploy after adding the plugin.

You might also like...

Netlify functions session cookie 🍪

netlify-functions-session-cookie 🍪 Cryptographically-signed session cookies for Netlify functions. Summary Install Concept and Usage API Environment

Jun 8, 2022

testing out ember + netlify's forms

testing out ember + netlify's forms

survey-netlify I'm trying Ember + Netlify Forms. Will it work? Let's find out. Steps so far added prember and ember-cli-fastboot used the version of f

Feb 14, 2022

Easiest way to build documentation for your project. No config or build required, hosted on @netlify.

Easiest way to build documentation for your project. No config or build required, hosted on @netlify.

Hyperdocs is the simplest way you can create documentation for your project. It blends the best of all the other documentation tools in one. Hyperdocs

Dec 22, 2022

A peculiar little website that uses Eleventy + Netlify + Puppeteer to create generative poster designs

A peculiar little website that uses Eleventy + Netlify + Puppeteer to create generative poster designs

Garden — Generative Jamstack Posters "Garden" is an experiment in building creative, joyful online experiences using core web technologies. 🧱 Buildin

Jun 13, 2022

A minimal e-commerce store using Gatsby, SANITY, Stripe, Use-Shopping-Cart and Netlify

🏪 Gatsby Starter Stripemart Like a supermarket but for Stripe. No ongoing monthly costs. Perfect for artists, creators and independent builders doing

Nov 14, 2022

This is a demo of updating a map to show air quality data for the user’s current location using Next.js Advanced Middleware, powered by Netlify Edge Functions.

Show Local Air Quality Based on the User's Location Use AQI data to show the air quality near the current user. This is built using Next.js Advanced M

Nov 4, 2022

Get an isolated preview database for every Netlify Preview Deployment

Get an isolated preview database for every Netlify Preview Deployment

Netlify Preview Database Plugin Create an isolated preview database for each preview deployment in Netlify Quickstart • Website • Docs • Discord • Twi

Nov 16, 2022

Diferentes demos em relação ao uso do Playwright para realização de palestras sobre o assunto

🎭 Playwright [Demos] - Palestra: Testes Inteligentes, Automatizados e Rápidos em Cross-Browser com Playwright! Repositório responsável pelas demos re

Oct 20, 2022

Google-reviews-crawler - A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file.

google-reviews-crawler A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file. Usage Clone the repo, install the de

Oct 26, 2022
Releases(v0.0.1)
  • v0.0.1(Sep 7, 2022)

    Features

    • Cache Playwright between builds on Netlify

    Full Changelog: https://github.com/nvh95/netlify-plugin-playwright-cache/commits/v0.0.1

    Source code(tar.gz)
    Source code(zip)
Owner
Hung Viet Nguyen
Full-time Open Source Contributor • Creator of jest-preview • #1 GitHub Developers Trending a few times • Core member of @bestofjs
Hung Viet Nguyen
Detect the executable python interpreter cmd in $PATH.

detect-python-interpreter Detect the executable python interpreter cmd in $PATH. Installation $ npm install --save detect-python-interpreter Usage con

Khaidi Chu 2 Apr 12, 2022
A pinia plugin for state persist.

Pinia Persists A pinia plugin for state persist. English | 简体中文 Usage Install npm i pinia-persists Use import { persist } from 'pinia-persists' import

Dewey Ou 18 Dec 12, 2022
Next js boilerplate with redux toolkit, redux persist and axios

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Jorge Alberto Villarreal Gongora 5 Apr 25, 2022
📦 Alpine JS plugin to extend the functionality of the official $persist plugin

Alpine JS Persist Extended Alpine JS magic method $storage extends the official $persist plugin to help you work with local storage ?? Example ?? <div

Mark Mead 11 Dec 28, 2022
Builds components using a simple and explicit API around virtual-dom

Etch is a library for writing HTML-based user interface components that provides the convenience of a virtual DOM, while at the same time striving to

Atom 553 Dec 15, 2022
Storybook add-on to enable SWC builds.

storybook-addon-swc Storybook addon that improves build time by building with swc. ?? Examples webpack4 webpack5 ?? Installation $ npm install -D stor

Karibash 49 Dec 20, 2022
Portfolioshop builds custom portfolio websites with submitted user data.

Portfolio Shop What our project does? We are trying to build a website to make the process of building personal portfolios easier. Often we have seen

Portfolio Shop 44 Dec 22, 2022
Stacks Voice is a reference project that builds on the SIP018 signed structured data standard to create an accountless internet forum.

Stacks Voice Stacks Voice is a reference project that builds on the SIP018 signed structured data standard to create an accountless internet forum. Th

Clarity Innovation Lab 4 Dec 21, 2022
A GitHub action to automate Rojo project builds.

Rojo Build Action This action swiftly builds your rojo places, models & assets. Inputs output Required This is the file you want the action to output

Compey 3 Oct 23, 2022
A build plugin to integrate Gatsby seamlessly with Netlify

Essential Gatsby Plugin This build plugin is a utility for supporting Gatsby on Netlify. To support build caching and Gatsby functions on Netlify, you

Netlify 72 Dec 27, 2022