errorMessage 'Cannot read property 'launch' of undefined
See original GitHub issueHello, I’m running the example code using Netlify functions and receiving the following error -
{ "errorType": "TypeError", "errorMessage": "Cannot read property 'launch' of undefined", "trace": [ "TypeError: Cannot read property 'launch' of undefined", " at Object.launchChromium (/var/task/src/node_modules/playwright-aws-lambda/dist/src/chromium.js:90:47)", " at processTicksAndRejections (internal/process/task_queues.js:97:5)", " at async Runtime.exports.handler (/var/task/src/makescreengrab.js:8:25)" ] }
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
[Question] "Cannot read property 'launch' of undefined" #3084
Hi Team, I am playing with AWS Lambda and Playwright. with "playwright-aws-lambda": "^0.5.2", "playwright-core": "^1.0.1", works fine but ...
Read more >Puppeteer launcher error results with undefined - Stack Overflow
Works import Puppeteer, { Browser, PDFOptions } from "puppeteer"; browser = await Puppeteer.launch({}); // Doesn't work import { launch, ...
Read more >Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >Error message: Cannot read property getInstance of undefined
Error message : Cannot read property getInstance of undefined · Click at the top of the Omni-bar where it says Secure and choose...
Read more >puppeteer-chat/Lobby - Gitter
... TypeError: Cannot read property 'toString' of undefined. i tried . ... my code works when i do const browser = await puppeteer.launch({headless:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @jamesgrubb. Try using
const context = await browser.newContext();
instead..defaultContext()
is no longer supported inplaywright-core
.use
import * as playwright from 'playwright-aws-lambda';