Skip to content

[Bug]: playwright install is broken when installing 1.51.0 from microsoft conda channel #2791

@cisaacstern

Description

@cisaacstern

Version

1.51.0

Steps to reproduce

I personally prefer to use pixi, but have verified the behavior is consistent on other conda-compatible environment managers, e.g. micromamba.

Example steps

  1. Install pixi https://pixi.sh/latest/#installation
  2. In an empty directory, run:
$ pixi init
$ pixi project channel add --prepend microsoft
$ pixi add microsoft:playwright
  1. The pixi.toml manifest file now reads:
$ cat pixi.toml
[project]
authors = ["Charles Stern <62192187+cisaacstern@users.noreply.github.com>"]
channels = ["microsoft", "conda-forge"]
name = "scratch"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[dependencies]
playwright = ">=1.51.0,<2"
  1. The playwright python package is importable without error
$ pixi run python3 -c "import playwright"
  1. But playwright install is not runnable, throwing:
$  pixi run playwright install
Traceback (most recent call last):
  File "/scratch/.pixi/envs/default/bin/playwright", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/scratch/.pixi/envs/default/lib/python3.13/site-packages/playwright/__main__.py", line 24, in main
    completed_process = subprocess.run(
        [driver_executable, driver_cli, *sys.argv[1:]], env=get_driver_env()
    )
  File "/scratch/.pixi/envs/default/lib/python3.13/subprocess.py", line 556, in run
    with Popen(*popenargs, **kwargs) as process:
         ~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/.pixi/envs/default/lib/python3.13/subprocess.py", line 1038, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scratch/.pixi/envs/default/lib/python3.13/subprocess.py", line 1974, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/scratch/.pixi/envs/default/lib/python3.13/site-packages/playwright/driver/node'
  1. Downgrading to <1.51.0...
$ pixi add "microsoft:playwright<1.51.0"
$ cat pixi.toml
[project]
authors = ["Charles Stern <62192187+cisaacstern@users.noreply.github.com>"]
channels = ["microsoft", "conda-forge"]
name = "scratch"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[dependencies]
playwright = "<1.51.0"
  1. ...resolves this issue, allowing us to run the following command without error
$ pixi run playwright install

Expected behavior

I would expect playwright install to be runnable without error when installing the latest playwright via the microsoft conda channel.

Actual behavior

playwright install is not runnable for the latest release on the microsoft conda channel, seemingly due to a lack of packaging the nodejs dependency.

Additional context

One possibility to protect against regressions on the fix might be to include playwright install in the test commands here:

commands:
- playwright --help

I am happy to contribute a fix if someone can point me in the right direction. TBH, it's a little confusing to me why this might be the case, given that the meta.yaml recipe does not seem to have changed too recently.

Thank you all for your support, I love working with playwright!

Environment

- Operating System: [Sonoma 14.4.1]
- CPU: [arm64]
- Browser: [All]
- Python Version: [3.13.2]
- Other info:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions