Chromium setup failure during Puppeteer installation on Windows 10

Hey everyone, I’m having trouble getting Puppeteer to work on my Windows 10 machine. Every time I try to install it, I keep running into this annoying error about Chromium not setting up properly.

I’ve tried a bunch of different things, like using the regular npm install command and even adding some extra flags to it. But no matter what I do, I keep getting the same error message about a self-signed certificate in the chain.

Here’s what I’ve tried so far:

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

Both of these give me the same error:

ERROR: Failed to set up Chromium r782078! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
Error: self signed certificate in certificate chain

Has anyone else run into this problem? I’m totally stuck and could really use some help figuring out what’s going on. Thanks in advance!

I encountered a similar issue while setting up Puppeteer on Windows. One solution that worked for me was using a package manager like yarn instead of npm. Try running ‘yarn add puppeteer’ in your project directory. If that doesn’t work, you might need to manually download Chromium and set the executablePath option when launching the browser. Also, ensure your Node.js is up to date, as older versions can sometimes cause installation problems with Puppeteer. If all else fails, consider using a pre-built Chromium binary and specifying its path in your Puppeteer configuration.

I’ve dealt with this exact issue before, and it can be quite frustrating. One thing that worked for me was setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to 0 before installing. You can do this by running:

set NODE_TLS_REJECT_UNAUTHORIZED=0

Then try your npm install command again. This bypasses the certificate check, which can sometimes cause problems.

Another option is to use a specific version of Puppeteer that you know works with your setup. For example:

npm install [email protected]

If these don’t work, you might need to dive into your network settings or proxy configuration. Sometimes corporate networks or VPNs can interfere with the installation process.

Remember to reset NODE_TLS_REJECT_UNAUTHORIZED after installation for security reasons.

hey, i had a similar hiccup. try setting your npm registry to http instead of https and clear your cache. also, check if your firewall or antiviurus isnt blocking the download. might be a cert issue. hope this helps, ttyl!