Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install #57

Open
homanchou opened this issue Aug 11, 2024 · 1 comment
Open

Unable to install #57

homanchou opened this issue Aug 11, 2024 · 1 comment

Comments

@homanchou
Copy link

When running mix playwright.install I get the following error:


00:01:40.922 [info] Installing playwright browsers and dependencies
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required

00:01:41.135 [info] Installing dependencies...
Switching to root user to install dependencies...
Failed to install browsers
Error: Installation process exited with code: 1

** (RuntimeError) Failed to install playwright browsers
    (playwright 1.44.0-alpha.3) lib/playwright/sdk/cli.ex:13: Playwright.SDK.CLI.install/0
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.2) lib/mix/cli.ex:96: Mix.CLI.run_task/2
    /home/titan/.kiex/elixirs/elixir-1.17.2-/bin/mix:2: (file)

I'm running this on ubuntu terminal of window subsystem for linux 2 if that makes a difference. Any suggestions?

@armanm
Copy link

armanm commented Sep 6, 2024

Looking at the code it looks like mix playwright.install is making a direct call to Playwright's driver cli to take care of installing its dependencies (browsers and FFmpeg). Is it possible that NodeJS is not installed properly on your machine?

{result, exit_status} = System.cmd(cli_path, ["install", "--with-deps"])

One possible way I can think of to diagnose the issue is to run npx playwright install. npx playwright install will download the PlayWright driver to your machine and then attempts to install its dependencies which is what the Mix task wants to do via a System.cmd/2. This should hopefully show better messages about the underlying issue.

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

No branches or pull requests

2 participants