()
| 9 | type PuppeteerBrowsers = typeof import("@puppeteer/browsers"); |
| 10 | |
| 11 | async function loadPuppeteerBrowsers(): Promise<PuppeteerBrowsers> { |
| 12 | try { |
| 13 | return await import("@puppeteer/browsers"); |
| 14 | } catch (err) { |
| 15 | const cause = normalizeErrorMessage(err); |
| 16 | throw new Error( |
| 17 | `Failed to load @puppeteer/browsers: ${cause}\n` + |
| 18 | `Fix: run \`npm install\` or \`bun install\` to restore missing packages, then retry.`, |
| 19 | ); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | const CHROME_VERSION = "131.0.6778.85"; |
| 24 | const CACHE_DIR = join(homedir(), ".cache", "hyperframes", "chrome"); |
no test coverage detected