Getting GLIBC_2.27 error when running Playwright

Current Behavior:
When deploying my Python web scraping project to Vercel, the deployment fails with this error:
/var/task/playwright/driver/node: /lib64/libm.so.6: version 'GLIBC_2.27' not found (required by /var/task/playwright/driver/node)

Expected Behavior:
Playwright should run successfully in the Vercel serverless environment

  • Framework: Python
  • Using Playwright

Steps to Reproduce:

  1. Python project with Playwright installed
  2. Basic scraping function using Playwright
  3. Deploy to Vercel
  4. Error occurs during deployment

Is it possible to deploy a Python project that uses Playwright to vercel?

Hey, @nazcodeland!

Cross-posting this discussion in case it is helpful :slight_smile:

1 Like

I know it may seem unrelated, but switching the Node version might fix it. What happens if you set the Node.js version to 20.x in project settings?

1 Like

Sorry for the delayed response. I started from scratch and changed the Node.js version to 20.x and it gave me the error that “it looks like playwright was just installed, please run playwright install”. But to I’ve decided to go the docker container route of handling this issue. Thank you for the support.

This can be closed.

I’m glad you found a solution that works for your project. Thanks for letting us know!