puppeteer not able to install: ERROR: Failed to set up Chromium r782078! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download

Viewed 35844

I am trying to install PUPPETEER in windows 10 using below command and getting an error.

Command used to install PUPPETEER

npm install --save PUPPETEER

Error:

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

I have also tried below option, still getting the same error

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

Note this is for Ubuntu 18, however, it should be a similar process for Windows though.

Set the environment variable (as the error suggests):

export PUPPETEER_SKIP_DOWNLOAD='true'

and then...

npm i puppeteer

Set npm mirror

npm config set puppeteer_download_host=https://npm.taobao.org/mirrors
npm i puppeteer

it will works

npm install puppeteer --unsafe-perm

It worked for me

Note, it works for Macbook M1 and Node 16

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=`which chromium`

it works for me

npm install --ignore-scripts puppeteer

I had to delete puppeteer from package.json, redo npm install, in order to make it work.

In my case I was connected to VPN which causing me issue in installing puppeteer

Related