#vercel deployment of playwright site not working

1 messages · Page 1 of 1 (latest)

daring storm
#

hi,

when i deploy my site to vercel, i keep getting this error when using playwright library, not testing (https://playwright.dev/docs/library#introduction)

sh: line 1: playwright: command not found
npm error code 127
npm error path /vercel/path0
npm error command failed
npm error command sh -c PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install

package.json:

"scripts": {
    "dev": "next dev --turbopack",
    "build": "next build && npx playwright install",
    "start": "next start",
    "lint": "next lint",
    "postinstall": "PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install"
  },
  "dependencies": {
    "playwright": "^1.50.1",
...

saw many comments that packages added to devdependencies won't be installed but this solution still isnt' working. i tested ./node_modules/.bin/playwright install and it said sh: line 1: ./node_modules/.bin/playwright: No such file or directory. not sure what to do since i can use playwright with localhost. any help would be amazing!

Introduction

visual umbraBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)