I am trying to install Playwright on my Node.js server but I’m encountering an error stating that the executable doesn’t exist at the specified path. It works fine locally, but not on Vercel.
It says the following message (even though i ran that command already):
Error: browserType.launch: Executable doesn’t exist at /home/sbx_user1051/.cache/ms-playwright/chromium-1155/chrome-linux/chrome
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ npx playwright install ║
║ ║
║ <3 Playwright Team ║
╚═════════════════════════════════════════════════════════════════════════╝
Has anyone successfully installed playwright on their node js server?
Playwright is focused on testing scenarios, so running it outside of local/CI environments is out of the project scope, sorry!
However, npx playwright install chromium should work on most systems. If you cannot run it in advance, try running it programmatically before using playwright.