Closed
Description
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
Activity
simonhaenisch commentedon 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.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 inpackage.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 commentedon Apr 11, 2021
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
.