# Build fails because of Playwright install

**URL:** <https://answers.netlify.com/t/build-fails-because-of-playwright-install/123506>\
**Category:** Support\
**Tags:** deployment\
**Created:** [August 6, 2024, 5:17pm UTC](https://answers.netlify.com/t/build-fails-because-of-playwright-install/123506 "2024-08-06T17:17:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![winkerVSbecks](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/winkervsbecks/32/55398_2.png) [@winkerVSbecks](https://answers.netlify.com/u/winkerVSbecks)\
**Post date:** [August 6, 2024, 5:17pm UTC](https://answers.netlify.com/t/build-fails-because-of-playwright-install/123506/1 "2024-08-06T17:17:34Z")

</div>

Site name: [Introduction • Chromatic docs](https://chromatic-docs.netlify.app/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:

```auto
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

---

<div class="post-metadata">

**Author:** ![winkerVSbecks](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/winkervsbecks/32/55398_2.png) [@winkerVSbecks](https://answers.netlify.com/u/winkerVSbecks)\
**Post date:** [August 6, 2024, 6:21pm UTC](https://answers.netlify.com/t/build-fails-because-of-playwright-install/123506/2 "2024-08-06T18:21:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SamO](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/samo/32/41847_2.png) [@SamO](https://answers.netlify.com/u/SamO)\
**Post date:** [August 7, 2024, 1:41pm UTC](https://answers.netlify.com/t/build-fails-because-of-playwright-install/123506/3 "2024-08-07T13:41:20Z")

</div>

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