user3563459
user3563459

Reputation: 717

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

I am trying to install Puppeteer in Windows 10 using the below command and am getting an error.

The 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 the below option, but I am still getting the same error.

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

Upvotes: 63

Views: 120968

Answers (12)

Kranti123
Kranti123

Reputation: 199

Upgrading puppeteer version to 23.0.2 worked for me with NodeJS 18.

Without puppeteer and chromium driver, test cases and test report generation was failing.

Upvotes: 0

shujuan lin
shujuan lin

Reputation: 1

I use system command to run:

SET PUPPETEER_SKIP_DOWNLOAD='true'

and then:

npm i puppeteer

not to use vscode terminal, then it is success

Upvotes: 0

join
join

Reputation: 1

npm install -g cnpm --registry=https://registry.npm.taobao.org

cnpm install puppeteer --save

Upvotes: 0

Elyas Yousefi
Elyas Yousefi

Reputation: 341

This works for me:

npm install --ignore-scripts puppeteer

Upvotes: 34

Mostafa Tabatabaei
Mostafa Tabatabaei

Reputation: 372

Set an npm mirror:

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

It will work.

Upvotes: 15

vahid majedi
vahid majedi

Reputation: 1

If you want to run stencil.js and start its developer server, in running the npm install command I had the above error, and by using a recommendation I handled the problem.

Upvotes: -1

CIAN STEENKAMP
CIAN STEENKAMP

Reputation: 828

Note: This is for Ubuntu 18.04 (Bionic Beaver). However, it should be a similar process for Windows though.

Set the environment variable (as the error suggests):

Mac

export PUPPETEER_SKIP_DOWNLOAD='true'

Windows

SET PUPPETEER_SKIP_DOWNLOAD='true'

and then...

npm i puppeteer

Upvotes: 82

Oakley Z
Oakley Z

Reputation: 139

Use:

npm install puppeteer --unsafe-perm

It worked for me.

Upvotes: 5

stoneshishang
stoneshishang

Reputation: 443

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

Upvotes: 0

Himanshu Joshi
Himanshu Joshi

Reputation: 126

In my case, I was connected to a VPN which caused me issue in installing Puppeteer.

Upvotes: 3

omers
omers

Reputation: 347

Note: It works for MacBook M1 and Node.js 16

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=`which chromium`

Upvotes: 11

babakfp
babakfp

Reputation: 334

On Windows (PowerShell)

Do this before installation:

$env:PUPPETEER_SKIP_DOWNLOAD="true"

Upvotes: 5

Related Questions