Skip to content

require('pptr-testing-library/extend') does not work with newer version of puppeteer #79

@BudgieInWA

Description

@BudgieInWA

I don't know when the puppetter node_modules layout changed, but the new layout seems to be breaking require('pptr-testing-library/extend').

I am using [email protected], [email protected], and [email protected], and when I import pptr-testing-library/extend in my Jest setup file it throws TypeError: Cannot read properties of undefined (reading 'Page'). Neither of the libPrefix options are present in the puppeteer node_modules install:

node_modules/puppeteer
├── install.js
├── lib
│   ├── cjs
│   │   └── puppeteer
│   │       ├── getConfiguration.d.ts
│   │       ├── getConfiguration.d.ts.map
│   │       ├── getConfiguration.js
│   │       ├── getConfiguration.js.map
│   │       ├── node
│   │       │   ├── install.d.ts
│   │       │   ├── install.d.ts.map
│   │       │   ├── install.js
│   │       │   └── install.js.map
│   │       ├── puppeteer.d.ts
│   │       ├── puppeteer.d.ts.map
│   │       ├── puppeteer.js
│   │       └── puppeteer.js.map
│   ├── esm
│   │   ├── package.json
│   │   └── puppeteer
│   │       ├── getConfiguration.d.ts
│   │       ├── getConfiguration.d.ts.map
│   │       ├── getConfiguration.js
│   │       ├── getConfiguration.js.map
│   │       ├── node
│   │       │   ├── install.d.ts
│   │       │   ├── install.d.ts.map
│   │       │   ├── install.js
│   │       │   └── install.js.map
│   │       ├── puppeteer.d.ts
│   │       ├── puppeteer.d.ts.map
│   │       ├── puppeteer.js
│   │       └── puppeteer.js.map
│   └── types.d.ts
├── node_modules
├── package.json
├── README.md
└── src
├── getConfiguration.ts
├── node
│   └── install.ts
├── puppeteer.ts
├── tsconfig.cjs.json
└── tsconfig.esm.json

10 directories, 34 files

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