playwright-cli を使用するためには Chrome を要求される:
$ playwright-cli open https://demo.playwright.dev/todomvc/
browserType.launch: Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "npx playwright install chrome"
しかし、 Arm64 Linux でこれをインストールすることができない:
$ bunx playwright install --with-deps chrome
Installing dependencies...
Switching to root user to install dependencies...
Hit:1 http://deb.debian.org/debian bookworm InRelease
...
Switching to root user to install dependencies...
++ arch
+ [[ aarch64 == \a\a\r\c\h\6\4 ]]
+ echo 'ERROR: not supported on Linux Arm64'
ERROR: not supported on Linux Arm64
+ exit 1
Failed to install browsers
Error: Failed to install chrome
Mac で DevContainer を使っているような場合に起こってちょっと困っていたが、 playwright-cli install で Chromium が install されるので、これに加えて playwright 側の install-deps を使うと Chromium で動作させることができるようだ。
$ npm install -g @playwright/cli@latest
$ playwright-cli install
$ npx playwright install-deps
--browser で Chromium が指定できる。
$ playwright-cli open https://demo.playwright.dev/todomvc/ --browser chromium
### Browser `default` opened with pid 11026.
- default:
- browser-type: chromium
- user-data-dir: <in-memory>
- headed: false
---
### Ran Playwright code
```js
await page.goto('https://demo.playwright.dev/todomvc/');
```
### Page
- Page URL: https://demo.playwright.dev/todomvc/#/
- Page Title: React • TodoMVC
- Console: 1 errors, 0 warnings
### Snapshot
- [Snapshot](.playwright-cli/page-2026-03-22T16-53-14-922Z.yml)
### Events
- New console entries: .playwright-cli/console-2026-03-22T16-53-14-535Z.log#L1
CLI で install できる Skill をそのまま利用すると Chrome で実行しようとしてしまうが、playwright install で作成される .playwright/cli.config.json で設定を行うと Chromium がデフォルトで利用されるようになる。
{
"browser": {
"browserName": "chromium",
"launchOptions": {
"channel": "chromium"
}
}
}
ただ、自分の場合はこの設定をリポジトリ内に置きたくなかったのと、DevContainer の Dotfiles 側で playwright-cli と skill を管理しているので、Skill 自体を書き換えてしまった:
他の方法として Firefox を利用するという手もあり、こちらも試してみて動作した。
$ npx playwright install --with-deps firefox