


Switching to firefox won´t work until you change the environment variable PUPPETEER_PRODUCT to firefox and reinstall puppeteer and download the firefox binaries. Step 1 We have to first install Puppeteer for the Firefox browser by executing the below command npm install puppeteer-firefox Also, we have to add the Firefox-Puppeteer library in the code. For any default puppeteer install only the chrome binaries will exist.

Please notice that I can not just create a hello world project and set product: 'firefox' because the binaries does not exist and will not automatically downloaded. How can I download firefox and chrome binaries together? That I can easily switch the product value? client = await puppeteer.launch() // or product: 'chrome' I tried to run npm update after switching the PUPPETEER_PRODUCT environment variable however this doesn´t work and nothing gets updated. As of version 3. It will delete the firefox binaries and only install chrome again. To use Puppeteer with Firefox, install the puppeteer package and set its product option to firefox. However when I change it back to chrome and reinstall it: npm config set PUPPETEER_PRODUCT chrome npm i puppeteer Installing a fonts package such as gnu-free-sans-fonts seems to fix the. Then inside of my project I run: npm i puppeteer Then open the download list and run the sudo yum install command to install the. I´am able to download firefox binaries for my project by set the environment variable: npm config set PUPPETEER_PRODUCT firefox npm i puppeteer
