Skip to content

Cannot read property 'launch' of undefined #15

Open
@jaradi

Description

@jaradi

Tried integrating playwright-aws-lambda with an existing project and got an error, so went back to basics, started a new npm project and followed the steps in the README as follows:

  • npm install playwright-core playwright-aws-lambda --save
  • copied the example under the Usage section and pasted it into my index file.
  • uploaded my function to lambda with nodejs12.x runtime.

When running the lambda I get the following error:

ERROR	Invoke Error 	{"errorType":"TypeError","errorMessage":"Cannot read property 'launch' of undefined","stack":
["TypeError: Cannot read property 'launch' of undefined","    at Object.launchChromium (/var/task/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/index.js:8:21)"]}

Apologies if this is user error. I did some research before logging this to see if there was an obvious fix, and simplified the repro process by using the bare minimum example code instead of my own code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions