When I try to run deno run -A --unstable html2pdf.ts, I get this error:
error: Uncaught (in promise) TypeError: Relative import path "stream" not prefixed with / or ./ or ../
at [https://deno.land/x/puppeteer_plus@0.14.0/vendor/puppeteer/src/common/util.ts:487:35
const {Readable} = await import('stream');
^
at async getReadableFromProtocolStream (https://deno.land/x/puppeteer_plus@0.14.0/vendor/puppeteer/src/common/util.ts:487:22)
at async Page.pdf (https://deno.land/x/puppeteer_plus@0.14.0/vendor/puppeteer/src/common/Page.ts:3055:22)
at async file:///home/ubuntu/Projects/html-to-pdf/html2pdf.ts:14:1
When I try to run
deno run -A --unstable html2pdf.ts
, I get this error:html2pdf.ts
:Deno.version
:I'm not sure how often this problem might be in the puppeteer, but it seems Deno require a fix for this code:
https://github.com/ratson/puppeteer_plus/blob/68223f46614434d2f089068e07c5b9ace05e52ba/vendor/puppeteer/src/common/util.ts#L487
Maybe something like
await import('./stream');
will do, but not sure in how many places.Also, isn't that Deno requires file extensions in the import path, like
.ts
?