I struggle uploading my Next.js project to Vercel, following error message is found in my build log:
╔══════════════════════════════════════════════════════╗ ║ Host system is missing dependencies to run browsers. ║ ║ Please install them with the following command: ║ ║ ║ ║ npx playwright install-deps ║ ║ ║ ║ Alternatively, use apt: ║ ║ apt-get install libnss3 ║ ║ libnspr4 ║ ║ libgbm1 ║ ║ ║ ║ <3 Playwright Team ║ ╚══════════════════════════════════════════════════════╝ at validateDependenciesLinux (/vercel/path0/node_modules/playwright-core/lib/server/registry/dependencies.js:216:9) at async Registry._validateHostRequirements (/vercel/path0/node_modules/playwright-core/lib/server/registry/index.js:575:43) at async Registry._validateHostRequirementsForExecutableIfNeeded (/vercel/path0/node_modules/playwright-core/lib/server/registry/index.js:673:7) at async Registry.validateHostRequirementsForExecutablesIfNeeded (/vercel/path0/node_modules/playwright-core/lib/server/registry/index.js:662:43) at async t.<anonymous> (/vercel/path0/node_modules/playwright-core/lib/cli/program.js:119:7)
In my package.json i declared the build command like this:
next build && npx playwright install chromium
When I use the recommended command in the terminal and when I include it in the package.json build command it does nothing.
I reinstalled the packages mutliple times, the program runs locally perfectly fine but as soon as I deploy the project these error messages occur.