I have written the command
npm i --location=global puppeteer
to install puppeteer. writing
npm install -g puppeteer
also produce the same error:
C:\windows\system32>npm install -g puppeteer
npm ERR! code 1
npm ERR! path C:\Users\NITU PANDEL\AppData\Roaming\npm\node_modules\puppeteer
npm ERR! command failed
npm ERR! command C:\windows\system32\cmd.exe /d /s /c C:\Users\NITUPA~1\AppData\Local\Temp\install6572787965.cmd
npm ERR! ERROR: Failed to set up Chromium r1011831! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm ERR! Error: getaddrinfo ENOTFOUND storage.googleapis.com
npm ERR! at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
npm ERR! errno: -3008,
npm ERR! code: 'ENOTFOUND',
npm ERR! syscall: 'getaddrinfo',
npm ERR! hostname: 'storage.googleapis.com'
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NITU PANDEL\AppData\Local\npm-cache\_logs\2022-07-08T11_02_45_016Z-debug-0.log
At first it successfully got installed and was able to run the code, but after a day it started to produce the above errors.
I tried everything available on Google.