X Tutup
Skip to content

Adds a short-circuit to prevent playwright install if OS is unsupported#13232

Open
weegeekps wants to merge 1 commit intomainfrom
weegeekps/fedora-fix
Open

Adds a short-circuit to prevent playwright install if OS is unsupported#13232
weegeekps wants to merge 1 commit intomainfrom
weegeekps/fedora-fix

Conversation

@weegeekps
Copy link
Contributor

@weegeekps weegeekps commented Feb 27, 2026

Description

Playwright is not fully supported on every operating system or even every Linux distribution. This is most noticeable within the Linux world, where outside of Debian and Ubuntu, it ranges from unsupported to partially supported.

What this does is adds a check to the prepare step in package.json to short circuit if being run on an unsupported system and quit before the playwright step.

I've had this locally on my Fedora system for a little while now and it has worked well.

Issue number and link

No issue.

Testing plan

Tested this out on Fedora by just running npm install which calls prepare.

I haven't tested it on Windows, macOS, or Ubuntu.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@github-actions
Copy link

Thank you for the pull request, @weegeekps!

✅ We can confirm we have a CLA on file for you.

@ggetz
Copy link
Contributor

ggetz commented Mar 3, 2026

Awesome, thanks for the PR @weegeekps!

@jjspace Which distribution of Linux are you running? Could you give this a review and test?

@ggetz
Copy link
Contributor

ggetz commented Mar 3, 2026

This is working for me locally on Mac. I ran:

git clean -dxf
npm install
npm run build
npm run test-e2e-update

Copy link
Contributor

@jjspace jjspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The versions required for this script don't seem to match those listed on the system requirements docs

Node.js: latest 20.x, 22.x or 24.x.
Windows 11+, Windows Server 2019+ or Windows Subsystem for Linux (WSL).
macOS 14 (Ventura) or later.
Debian 12 / 13, Ubuntu 22.04 / 24.04 (x86-64 or arm64).

For example, Ubuntu 20 is not supported but this script allows it.

More importantly I would consider this function to be the true "source of truth"
https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/utils/hostPlatform.ts#L39
It'd be really nice if we could just use it directly but it doesn't seem to be exported anywhere or checkable with the CLI. The below works but generally I'd prefer to avoid importing directly from node_modules

import host from "../node_modules/playwright-core/lib/server/utils/hostPlatform.js";
const { isOfficiallySupportedPlatform } = host;

I'm worried a bit about getting out of sync with the official list as time goes on and they drop support for more platforms.

The playwright team has also been very adamant (read: stubborn) about supporting any versions that are non-LTS, for Ubuntu that's any Odd versions. I'm on 25.10 which breaks when installing --with-deps because one "doesn't exist anymore" even though I already have it installed. This script currently does nothing to help me during npm install

I think it could be a good idea to add a section to the End to End Testing guide that playwright installation will have to be manual and per dev if they're not using a supported OS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup