Build fails because of Playwright install

Site name: Introduction • Chromatic docs

I use Playwright as a build dependency. To install Playwright, I was using "postinstall": "pnpm dlx playwright install chromium", command. It worked fine until recently. Now when I run deploys, I get the following error:

1:11:14 PM: browserType.launch: Executable doesn't exist at /opt/buildhome/.cache/ms-playwright/chromium-1124/chrome-linux/chrome
╔═════════════════════════════════════════════════════════════════════════╗
1:11:14 PM: ║ Looks like Playwright Test or Playwright was just installed or updated. ║
1:11:14 PM: ║ Please run the following command to download new browsers:              ║
1:11:14 PM: ║                                                                         ║
1:11:14 PM: ║     pnpm exec playwright install                                        ║
1:11:14 PM: ║                                                                         ║
1:11:14 PM: ║ <3 Playwright Team                                                      ║
1:11:14 PM: ╚═════════════════════════════════════════════════════════════════════════╝
1:11:14 PM:     at /opt/build/repo/node_modules/.pnpm/mermaid-isomorphic@2.2.1/node_modules/mermaid-isomorphic/dist/mermaid-isomorphic.js:96:39
1:11:14 PM:     ... 40 lines matching cause stack trace ...

I’ve tried switching to a preinstall hook. What is the recommend method for install playwright as a dependency for Netlfiy?

I’m running tests with Github Actions and have had no issues with Playwright installs

Switched to pnpm dlx playwright-core install chromium as the install command. That seems to work.

hiya @winkerVSbecks :wave:t6: thanks for writing in and sharing your solution. This will help other folks who stumble upon this thread with a similar issue.