Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: no exported member 'FrameAddScriptTagOptions' #87

Closed
hjr3 opened this issue Mar 8, 2021 · 2 comments
Closed

bug: no exported member 'FrameAddScriptTagOptions' #87

hjr3 opened this issue Mar 8, 2021 · 2 comments
Labels

Comments

@hjr3
Copy link

hjr3 commented Mar 8, 2021

Context:

  • version (md-to-pdf -v): 3.3.1
  • platform (Unix, macOS, Windows): macOS
  • node version: v12.21.0

Describe the bug:

First, thank you for the package.

After upgrading from 3.2.1 to 3.3.1 I encountered the following error:

node_modules/md-to-pdf/dist/lib/config.d.ts:3:10 - error TS2305: Module '"../../../@types/puppeteer"' has no exported member 'FrameAddScriptTagOptions'.

3 import { FrameAddScriptTagOptions, LaunchOptions, PDFOptions } from 'puppeteer';
           ~~~~~~~~~~~~~~~~~~~~~~~~

This type does not exist in @types/puppeteer. I think this type only exists in version of puppeteer from 7.0 and higher. The package.json says any version greater than 2.0.0 but the package-lock.json has v7.1.0.

I think the solution is to:

  • change the minimum version for puppeteer to be ^7.1.0.
  • remove @types/puppeteer as puppeteer 7.0 onward includes types
@hjr3 hjr3 added the bug label Mar 8, 2021
@simonhaenisch
Copy link
Owner

simonhaenisch commented Mar 8, 2021

Thanks for the info. Before releasing this, I actually tried downgrading puppeteer to 2.0 and everything was working ok 🤷🏻‍♂️ That's why I was assuming that the type came from @types/puppeteer.

Anyway, the reason it's set to >=2.0.0 is #62. But yeah since I'm apparently using features from v7 now , I should probably bump that to >=7.0.0. Also good to know that Puppeteer includes types now.

The package.json says any version greater than 2.0.0 but the package-lock.json has v7.1.0.

I don't think this should be a problem? All versions need to be pinned down in package-lock.json (i. e. exact version I'm using) but they don't need to be pinned down in package.json (i. e. versions that I'm saying are compatible).

I'll have a look at this when I find some free time (might take a bit, maybe just use an older version in the meantime).

@simonhaenisch
Copy link
Owner

Hi again, just a quick update: I'm looking to resolve this issue in the next few days. Probably will have to bump puppeteer to >=7.0.1 and stop using @types/puppeteer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants