Trying to install puppeteer, I followed the installation guide.
However, after a few seconds, I encountered this error:
.../node_modules/puppeteer postinstall$ node install.mjs
│ PUPPETEER_DOWNLOAD_HOST is deprecated. Use PUPPETEER_DOWNLOAD_BASE_URL instead.
│ ERROR: Failed to set up Chrome r119.0.6045.105! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
│ Error: Download failed: server returned code 404. URL: https://npm.taobao.org/mirrors/119.0.6045.105/win64/chrome-win64.zip
│ at file:///C:/Users/Asus/Desktop/WorkSpace/Projects/test/Server/node_modules/.pnpm/@<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95e5e0e5e5f0e1f0f0e7bef7e7fae2e6f0e7e6d5a4bbacbba5">[email protected]</a>/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js:74:31
│ at ClientRequest.requestCallback (file:///C:/Users/Asus/Desktop/WorkSpace/Projects/torob/Server/node_modules/.pnpm/@<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="631316131306170606114801110c141006111023524d5a4d53">[email protected]</a>/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js:52:13)
│ at Object.onceWrapper (node:events:629:26)
│ at ClientRequest.emit (node:events:514:28)
│ at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
│ at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
│ at TLSSocket.socketOnData (node:_http_client:535:22)
│ at TLSSocket.emit (node:events:514:28)
│ at addChunk (node:internal/streams/readable:376:12)
│ at readableAddChunk (node:internal/streams/readable:349:9)
└─ Failed in 5.1s at C:\Users\Asus\Desktop\WorkSpace\Projects\test\Server\node_modules\.pnpm\<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="453530353520312020370577746b736b75">[email protected]</a>\node_modules\puppeteer
ELIFECYCLE Command failed with exit code 1.
After some research, I discovered that using
npm config set puppeteer_skip_chromium_download true
might resolve the issue. However, when I attempted it, I received the following message:
npm ERR! `puppeteer_skip_chromium_download` is not a valid npm option
My Node version: 20.9.0
NPM version: 10.2.4
Yarn version: 1.22.19
PNPM version: 8.11.0
(I used NPM, Yarn, and PNPM)
Note: Puppeteer-core can be installed without any issues.