lucacasonato / deno-puppeteer

A port of puppeteer running on Deno
https://deno.land/x/puppeteer
MIT License
454 stars 44 forks source link

Won't run on an M2 MacBook Air #88

Open marktyers opened 1 year ago

marktyers commented 1 year ago

Simple example:

import puppeteer from 'https://deno.land/x/puppeteer@16.2.0/mod.ts'

const args = [`--window-size=${800},${600 + 74}`]
const browser = await puppeteer.launch({ headless: true, slowMo: 50, args })
const page = await browser.newPage()
await page.goto('https://google.com')
await page.screenshot({ path: 'example.png' })

await browser.close()

When run I get the error:

% deno run -A --unstable simple.spec.js
error: Uncaught (in promise) Error: Bad CPU type in executable (os error 86)
    this.proc = Deno.run({
                     ^
    at opRun (ext:runtime/40_process.js:46:14)
    at Object.run (ext:runtime/40_process.js:132:15)
    at BrowserRunner.start (https://deno.land/x/puppeteer@16.2.0/src/deno/BrowserRunner.ts:64:22)
    at ChromeLauncher.launch (https://deno.land/x/puppeteer@16.2.0/src/deno/Launcher.ts:108:12)
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async file:///Users/x/simple.spec.js:4:17
lisahns commented 11 months ago

What version of Deno are you using? I remember encountering a similar error, I think deno upgrade fixed it for me.