A port of puppeteer running on Deno
First of all, thank you very much for your work on Deno, its ecosystem, in the TC39 as a deligate (`Response.json` wooo!), with Fresh, and in general in open source. It's extremely appreciated and you're doing a great job! This evening, after upgrading from `deno v1.29.4` to `deno v1.30.0` I began to see the following error when I ran code which imports this module: ``` error: Uncaught Error: Deno.core.runMicrotasks() is not supported in this environment throw new Error( ^ at Object.runMicrotasks (https://deno.land/[email protected]/node/_core.ts:22:13) at processTicksAndRejections (https://deno.land/[email protected]/node/_next_tick.ts:62:10) at https://deno.land/[email protected]/node/process.ts:375:7 at innerInvokeEventListeners (deno:ext/web/02_event.js:776:9) at invokeEventListeners (deno:ext/web/02_event.js:816:7) at dispatch (deno:ext/web/02_event.js:685:11) at dispatchEvent (deno:ext/web/02_event.js:1066:14) at [deno:cli/worker.rs:90:39]:1:1 ``` Here is all that is needed to reproduce this error: ```ts // ./mod.ts import puppeteer from "https://deno.land/x/[email protected]/mod.ts"; if (import.meta.main) { console.log(puppeteer); } ``` > `deno run --allow-env ./mod.ts` For context, here is information about my environment: ``` Deno Version: 1.30.0 deno --version deno 1.30.0 (release, x86_64-unknown-linux-gnu) v8 10.9.194.5 typescript 4.9.4 OS: Pop!_OS 22.04 LTS x86_64 (Linux) ``` Also, I looked into this error a little (at the referenced line at the top of the stack trace https://deno.land/[email protected]/node/_core.ts:22:13 as well as the analogous code in the latest version of stdlib https://deno.land/[email protected]/node/_core.ts?source#L26), which prompted me to go into the repl and just see what I get when I check the availability of that internal `Deno-core` set of APIs, and found the following: ``` > Deno?.[Deno.internal]?.core.runMicrotasks.toString() "() => ops.op_run_microtasks()" > Deno?.core?.runMicrotasks undefined ``` so, apparently between `deno v1.29.4` and `deno v1.30.0`, something was moved out of `Deno.core` and into `Deno[Deno.internal].core` (if I'm reading this right). I did not check if this was just the fruition of a deprecation, but I wouldn't be surprised to learn that it was given that we just crossed a new minor. It's possible that all that's needed to address this is to bump the versions of the `stdlib` being used by `deno-puppeteer` but I wanted to surface this error in case there's something deeper going on. --- I looked around for alternate `puppeteer` modules for Deno, and found that this one, https://deno.land/x/[email protected], is able to run a simple script just fine for me: e.g. ```ts // ./second-mod.ts import { puppeteer } from "https://deno.land/x/[email protected]/mod.ts"; const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto("https://example.com"); await page.screenshot({ path: "example.png" }); await browser.close(); ``` > `deno run -A ./second-mod.ts` but there are no others which worked when I tried for various reasons (most seem to be due to things being out of date). Also weird, is that the GitHub repo associated with https://deno.land/x/[email protected] is 404'ing , and in fact, so is that entire user account...weird :grimacing:
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by andrewbrey and has received 2 comments.