šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

netlify-plugin-playwright-cache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-plugin-playwright-cache

Persist the Playwright executables between Netlify builds.

0.0.1
latest
Source
npm
Version published
Weekly downloads
127
-5.22%
Maintainers
1
Weekly downloads
Ā 
Created
Source

Netlify Plugin Playwright Cache

Persist the Playwright executable 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 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

Installation via the Netlify UI is coming soon.

Configuration

Update netlify.toml to include the plugin:

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

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

Keywords

netlify

FAQs

Package last updated on 07 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts