I tried and tested on a different local environment like Windows, Linux, mac and everywhere it works fine but once I deploy my nextjs app on Vercel, I m getting the below error
browserType.launch: Executable doesn t exist at /home/sbx_user1051/.cache/ms-playwright/chromium-1067/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 ║
╚═════════════════════════════════════════════════════════════════════════╝
at pdf (/var/task/.next/server/pages/api/jobOrders/pdf.js:58:80)
at pdfHandler (/var/task/.next/server/pages/api/jobOrders/pdf.js:91:31) {
name: Error
}
To resolve this issue, I tried modifying the build command in Vercel deployment settings to
next build && npx playwright install
While I see the browsers like Chrome and firefox getting installed successfully, still I wonder why I m getting this error.