Skip to content

[BUG] Error: ENOENT: no such file or directory, open '/var/task/node_modules/playwright-core/browsers.json' on Vercel with Next.js #5862

Description

@BrunoQuaresma

After upgrade Playwright to 1.9.2 this error is happening on Vercel functions.

2021-03-16T19:57:07.806Z	undefined	ERROR	Error: ENOENT: no such file or directory, open '/var/task/node_modules/playwright-core/browsers.json'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at new Registry (/var/task/node_modules/playwright-core/lib/utils/registry.js:213:54)
    at new Playwright (/var/task/node_modules/playwright-core/lib/server/playwright.js:46:23)
    at Object.createPlaywright (/var/task/node_modules/playwright-core/lib/server/playwright.js:59:12)
    at setupInProcess (/var/task/node_modules/playwright-core/lib/inprocess.js:24:37)
    at Object.<anonymous> (/var/task/node_modules/playwright-core/lib/inprocess.js:42:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/var/task/node_modules/playwright-core/browsers.json'
}
RequestId: fafc5e6c-b338-4ba2-90b0-a019fd78923b Error: Runtime exited with error: exit status 1
Runtime.ExitError

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions