[Feature] `install-deps` should be more friendly to users of other Linux distros
See original GitHub issueCurrently, only Ubuntu 18.04 and 20.04 are officially supported by Playwright.
Out of the box on Manjaro, playwright is able to be installed and run a tests both in headless and headed mode:
- npm i -D @playwright/test
- npx playwright install
- npx playwright test
Code under test:
const { test, expect } = require('@playwright/test');
test('basic test', async ({ page }) => {
await page.goto('https://foo.loc/');
const title = page.locator('.site-title a');
await expect(title).toHaveText('Foo Test');
});
It works.
However, when I try to execute the same test with more browsers after specifying chromium
, firefox
and webkit
on playwright.config.js
, playwright prompts me to install dependencies:
When running npx playwright install-deps
, I get:
Installing Ubuntu dependencies...
sh: line 1: apt-get: command not found
The error is clear, it tries to install some package with apt-get
, which does not exist in Arch Linux. However, it doesn’t tell me which one, so that I can install it on my own.
To get around this, I was trying to figure out what I needed to install on my own. The closest I could get was to this list: https://github.com/microsoft/playwright/blob/d34f9972abf3e412c9a73ee7b524e529a89136f8/packages/playwright-core/src/utils/nativeDeps.ts
But surely I don’t need all of that, as the Chromium works out of the box both headless and headed, so there must be some package missing in my environment that I need to install.
My request is that install-deps
be specific about what dependencies are missing, so that users of other distros of Linux can have a chance to manually install the dependencies themselves.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:14
- Comments:27 (8 by maintainers)
I’m also using Arch I am unable to run playwright at the moment because I have no clue what deps I should manually install. At least a list would be great…
I finally managed to get playwright to run Chromium, Firefox and Webkit on Arch by installing these packages:
aur/enchant1.6 aur/icu66 aur/libwebp052
As mentioned in this comment https://github.com/microsoft/playwright/issues/2621#issuecomment-931530175