question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Missing type definition in puppeteer-extra@3.3.1

See original GitHub issue

Describe the bug

I think it is a packaging problem.

puppeteer-extra@3.3.1 (error occurs)

node_modules/
    puppeteer-extra/
        dist/
            index.cjs.js
            index.cjs.js.map
            index.d.ts
            index.esm.js
            index.esm.js.map
            index.js
            index.js.map
        LICENSE
        package.json
        readme.md

In node_modules/puppeteer-extra/dist/index.d.ts:

/// <reference path="../src/puppeteer-legacy.d.ts" />
import { PuppeteerNode } from 'puppeteer';

First, it should be ../dist/puppeteer-legacy.d.ts instead of ../src/puppeteer-legacy.d.ts. Second, ambient.d.ts and puppeteer-legacy.d.ts are missing in this version.

puppeteer-extra@3.3.0 (works properly)

node_modules/
    puppeteer-extra/
        dist/
            ambient.d.ts
            index.cjs.js
            index.cjs.js.map
            index.d.ts
            index.esm.js
            index.esm.js.map
            index.js
            index.js.map
            puppeteer-legacy.d.ts

In node_modules/puppeteer-extra/dist/index.d.ts:

/// <reference path="../dist/puppeteer-legacy.d.ts" />
import { PuppeteerNode } from 'puppeteer';

Code Snippet

import puppeteer from 'puppeteer-extra';
node_modules/puppeteer-extra/dist/index.d.ts:2:10 - error TS2305: Module '"puppeteer"' has no exported member 'PuppeteerNode'.

2 import { PuppeteerNode } from 'puppeteer';
           ~~~~~~~~~~~~~

node_modules/puppeteer-extra/dist/index.d.ts:1:22 - error TS6053: File '/workspace/node_modules/puppeteer-extra/src/puppeteer-legacy.d.ts' not found.

1 /// <reference path="../src/puppeteer-legacy.d.ts" />
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Versions

This issue was introduced in the most recent version puppeteer-extra@3.3.1.

  System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) arm64 unknown
    Memory: 1.81 GB / 3.84 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.15.1 - /usr/local/bin/node
    Yarn: 3.0.2 - /usr/local/share/npm-global/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
berstendcommented, Jul 7, 2022

Fixed in puppeteer-extra@3.3.2, apologies 😄

1reaction
layerlrecommented, Jul 7, 2022

same here

node_modules/puppeteer-extra/dist/index.d.ts:1:22 - error TS6053: File ‘./node_modules/puppeteer-extra/src/puppeteer-legacy.d.ts’ not found.

1 /// <reference path="../src/puppeteer-legacy.d.ts" />

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build fails because of missing type definitions #1076 - GitHub
Describe the bug Whenever I add a test to the project and try to run npm run build, I get type definition errors....
Read more >
ARRAY is missing type definition for its values Sequelize ...
As the error message suggests it needs to be an array of something. e.g.: Sequelize.ARRAY(Sequelize.TEXT) Also array types are only supported on ...
Read more >
puppeteer-extra - npm
puppeteer-extra is a drop-in replacement for puppeteer, // it augments the installed puppeteer with plugin functionality.
Read more >
integration object modelling missing type definition for ...
3) I select my attribute. I have problem with the sapPlant field. When I select it. sapfield.png. and I ckick save. I see...
Read more >
Missing type definition (typescript) - Handsontable Forum
Hi, We have upgraded to the latest version (11.1.0) and are experiencing missing type definitions for the samplingRatio and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found