Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module build Failed #167

Open
JonhnyDev opened this issue Nov 6, 2022 · 0 comments
Open

Module build Failed #167

JonhnyDev opened this issue Nov 6, 2022 · 0 comments

Comments

@JonhnyDev
Copy link

JonhnyDev commented Nov 6, 2022

I'm trying to use ELECTRONJS + ReactJS + Typescript with 'puppeteer-core' it works perfectly when I don't use puppeteer
but when I add the puppeteer
returns this error below, can anyone help me?

import chrome from 'chrome-aws-lambda'
import puppeteer from 'puppeteer-core'

export async function Auth(url: string) {
  const browser = await puppeteer.launch({
    args: chrome.args,
    executablePath: await chrome.executablePath,
    headless: chrome.headless
  })
  const page = await browser.newPage()
  await page.goto(url)
  await page.screenshot({ path: 'example.png' })
  await browser.close()
  return true
}
  ipcMain.on('message', async (_, message) => {
    await Auth(url) //if I commit this line the application works normally again
  })

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant