I currently use this shell.nix
for JS:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.nodejs-18_x
pkgs.playwright
];
PLAYWRIGHT_BROWSERS_PATH="${pkgs.playwright-driver.browsers}";
}
Note that there is no playwright.browsers
anymore, now it’s playwright-driver.browsers
(see Build failure: playwright · Issue #215450 · NixOS/nixpkgs · GitHub).
I can then do a playwright open nixos.org
, but I can’t run tests with npm or run a visual studio code instance for testing with the playwright extension. It always tells me to install the browsers with npx playwright install
.