I've tried with Puppeteer v5.4.0, v5.4.1, and v5.5.0, Windows 10/MacOS, and Node v12/v14.0.1/v15.0.3 to try to get Puppeteer to run in Electron.
Doing a simple puppeteer.launch() like this in the main process of a React application:
const puppeteer = require('puppeteer');
(async function(){
const browser = await puppeteer.launch();
})();
returns this:
Uncaught (in promise) Error: Could not find browser revision 818858. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
at ChromeLauncher.launch (Launcher.js:120)
at async http:/localhost:8080/main.js:61295
I've tried running PUPPETEER_PRODUCT=firefox yarn install, setting the executablePath in the launch() method, deleting node_modules and package-lock.json, but none of these solutions seem to work. In the case of setting a path, it returns a ENOENT error. Weird enough, though, writing a small script and running it through node test.js seems to work fine.