npm i puppeteer has Failed to set up Chromium r756035

Viewed 7460

While trying to install puppeteer with: npm i puppeteer getting this error. My Node version is v12.16.3. I'm on a windows machine.

<!-- language: lang-none -->
ERROR: Failed to set up Chromium r756035! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (internal/errors.js:608:14)
    at TLSSocket.onConnectEnd (_tls_wrap.js:1514:19)
    at Object.onceWrapper (events.js:416:28)
    at TLSSocket.emit (events.js:322:22)
    at endReadableNT (_stream_readable.js:1187:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
  -- ASYNC --
    at BrowserFetcher.<anonymous> (C:\Users\Red Viper\AppData\Roaming\npm\node_modules\puppeteer\lib\helper.js:116:19)
    at fetchBinary (C:\Users\Red Viper\AppData\Roaming\npm\node_modules\puppeteer\install.js:148:8)
    at download (C:\Users\Red Viper\AppData\Roaming\npm\node_modules\puppeteer\install.js:54:9) {
  code: 'ECONNRESET',
  path: null,
  host: 'storage.googleapis.com',
  port: 443,
  localAddress: undefined
}
4 Answers

use --unsafe-perm

It works for me!

npm i puppeteer -g --unsafe-perm

For me, the reason was that this address was banned in my country. I had to use a proxy to avoid this error.

Run following command from terminal:

Mac:

export PUPPETEER_SKIP_DOWNLOAD='true'

Windows:

SET PUPPETEER_SKIP_DOWNLOAD='true'

Both will set environment variable and you should be fine with execution

Probably you're behind a proxy, may be you can contact your network/security admin in your organization. This was the case for me, and the issue didn't appear in my home network.

Related