Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download

I am trying to install react-snap using this command 'sudo npm install --save-dev react-snap' in ubuntu 18 it's give me the error

ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.

after search i will get the solution to run this command

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

after running this command still, i am facing this error, My react version is 16.8

    ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `node install.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
like image 785
Bahadur Singh Deol Avatar asked Nov 28 '19 12:11

Bahadur Singh Deol


2 Answers

The best way is to export default env var PUPPETEER_SKIP_CHROMIUM_DOWNLOAD

PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn add puppeteer or
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install puppeteer
like image 106
virus Avatar answered Nov 05 '22 07:11

virus


I fixed it by installing Chromium manually using this command:

node node_modules/puppeteer/install.js
like image 4
Afshin Ghazi Avatar answered Nov 05 '22 05:11

Afshin Ghazi