Issues with Puppeteer Installation: Encountering 'ERROR: Unable to configure Chromium r782078! Use 'PUPPETEER_SKIP_DOWNLOAD' environment variable to bypass download'

I’m attempting to install Puppeteer on a Windows 10 system using the following command, but I encounter an error. Here is the command I used for the installation:

npm install --save PUPPETEER

The error I receive is:

ERROR: Unable to configure Chromium r782078! Use 'PUPPETEER_SKIP_DOWNLOAD' environment variable to bypass download.
Error: self signed certificate in certificate chain

Additionally, I tried the following command, yet the same error persists:

npm install -g puppeteer --unsafe-perm=true --allow-root

Hey CreatingStone,

Try these steps to resolve the Puppeteer installation issue on Windows:

  1. Set the environment variable to skip Chromium download:
  2. set PUPPETEER_SKIP_DOWNLOAD=true
  3. Install Puppeteer using this command:
  4. npm install puppeteer
  5. To handle certificate errors, temporarily disable TLS checks (only do this in a safe environment):
  6. set NODE_TLS_REJECT_UNAUTHORIZED=0

These steps should help get Puppeteer installed without fetching Chromium. Network adjustments might be necessary if issues persist.

Hi CreatingStone,

This error usually stems from network issues or proxy settings that interfere with downloading Chromium, which Puppeteer depends on. Here's a solution to bypass the download process and handle the certificate issue:

  1. First, set the PUPPETEER_SKIP_DOWNLOAD environment variable to bypass Chromium download. Use the following command:
    set PUPPETEER_SKIP_DOWNLOAD=true
  2. Then, install Puppeteer with:
    npm install puppeteer
  3. Next, configure your network settings to trust the self-signed certificate or bypass it by setting the NODE_TLS_REJECT_UNAUTHORIZED variable to 0 temporarily. You should only use this for trusted networks:
    set NODE_TLS_REJECT_UNAUTHORIZED=0

These steps should help you resolve the installation issue without downloading Chromium. Preferably, running these steps in a secure environment is advised to avoid security risks.

If the problem persists or you need Chromium, try installing Puppeteer with a VPN or different network settings.

Hi CreatingStone,

The challenges you're encountering are relatively common when dealing with network-related issues or restricted environments, such as those found behind a corporate firewall or using self-signed certificates. Here's a slightly different approach that may help you overcome these issues:

  1. Start by verifying your current NPM configuration for proxy settings. Check if your NPM is correctly configured to use the internet by examining your NPM configuration:
  2. npm config list

    Look for any proxy settings in the output.

  3. If your network uses a proxy, configure it properly:
  4. npm config set proxy http://:@:
    npm config set https-proxy http://:@:

    Ensure to replace <USER>, <PASSWORD>, <HOST>, and <PORT> with your proxy's actual details.

  5. Given the certificate issue, double-check your system's certificate authorities. If you're sure about the security of the source, you can also use the cafile config to specify a file containing trusted certificates:
  6. npm config set cafile /path/to/cert.pem
  7. If you continue to experience issues, try uninstalling Puppeteer completely and then reinstall:
  8. npm uninstall puppeteer
    npm install puppeteer --global-style --also=dev

These steps focus on ensuring your system's connectivity and trust settings are optimal for the installation. Navigating network restrictions can be tricky, so being cautious and ensuring network security guidelines are respected is important.