TrevorSundberg / puppeteer-in-electron

Use puppeteer to test and control your electron application.
MIT License
342 stars 51 forks source link

error TS2345: Argument of type 'PuppeteerNode' is not assignable to parameter #59

Closed xucongyong closed 1 year ago

xucongyong commented 1 year ago

tsc && vite build && electron-builder --mac zip

electron/main/index.ts:10:42 - error TS2345: Argument of type 'PuppeteerNode' is not assignable to parameter of type 'typeof import("/Users/xucongyong/temp/electron-vite-project/node_modules/.store/@types+puppeteer-core@1.20.0/node_modules/@types/puppeteer-core/index")'. Type 'PuppeteerNode' is missing the following properties from type 'typeof import("/Users/xucongyong/temp/electron-vite-project/node_modules/.store/@types+puppeteer-core@1.20.0/node_modules/@types/puppeteer-core/index")': createBrowserFetcher, errors, devices

10 const browser = await pie.connect(app, puppeteer);



Found 1 error in electron/main/index.ts:10
AntoineKM commented 1 year ago

weird workaround but will work for sure:

const browser = await pie.connect(app, puppeteer as any);