I am trying to deploy playwright into a cluster using as docker image, Evrything works fine in local system but as soon as I put it in a pod, gets an error saying
1) [webkit] › dummy.spec.js:7:8 › API Designer › Should display data in All Services =============
browserType.launch: Failed to launch: Error: spawn /opt/app/node_modules/@playwright/test/node_modules/playwright-core/.local-browsers/webkit-1699/pw_run.sh ENOENT
=========================== logs ===========================
<launching> /opt/app/node_modules/@playwright/test/node_modules/playwright-core/.local-browsers/webkit-1699/pw_run.sh --inspector-pipe --headless --no-startup-window
[pid=N/A] starting temporary directories cleanup
[pid=N/A] finished temporary directories cleanup
============================================================
at Object._baseTest.extend.browser.scope [as fn] (/opt/app/node_modules/@playwright/test/lib/index.js:226:51)
at /opt/app/node_modules/@playwright/test/lib/fixtures.js:112:81
Any suggestion to get rid of this error.
I am running tests using node
const { exec } = require("child_process");
exports.runTests = async () => {
const proc = exec(
`DEBUG=pw:browser* PLAYWRIGHT_BROWSERS_PATH=./node_modules/@playwright/test/node_modules/playwright-core/.local-browsers npx playwright test`,
(error, stdout, stderr) => {
if (error) {
console.log(`error : ${error}`);
}
if (stderr) {
console.log(`error : ${stderr}`);
}
}
);
proc.stdout.pipe(process.stdout);
};